how to pass the id in query string to multiple tabs in the browser
<script type="text/javascript">var queryString = new Array();
$(function () {
if (queryString.length == 0) {
debugger;
if (window.location.search.split('?').length > 1) {
var params = window.location.search.split('?')[1].split('&');
debugger;
for (var i = 0; i < params.length; i++) {
var key = params[i].split('=')[0];
var value = decodeURIComponent(params[i].split('=')[1]);
queryString[key] = value;
alert(queryString[key]);
}
}
}
</script>
here i am getting id as alert but instead of displaying the id as alert i need to pass the id to multiple tabs and these multiple tabs are opened by the user dynamically to this dynamically opened mutiple tabs i need to pass the id in such a way that my extension works with keydown
And when i am in that tab where i have audio this is my code
<asp:TemplateField HeaderText="Play Audio File" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" >
<ItemTemplate>
<audio controls="controls" id="player">
<source src='<%# Eval("audio") %>' />
your browser does not support the audio element.</audio>
</ItemTemplate>
</asp:TemplateField>
<script type = "text/javascript">
var audio = document.getElementById("player");
window.addEventListener("keydown", playPauseKb, false);
function playPauseKb(event) {
var x = event.keyCode;
console.log(x);
if (x == 120) {
audio.currentTime -= 5;//F9 Rewined
}
else if (x == 122) {
//event.data.$.preventDefault();
audio.currentTime += 5;//F11 forword
}
else if (x == 121) {
if (audio.paused) {
audio.play();//F10 paly/pause
}
else {
audio.pause()
}
}
}
</script>
which works with keydown but if user opens a new tab dynamically keydown is not working how can i control the audio with keydown from multiple tabs