Jump to content

Search the Community

Showing results for tags 'google chrome'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 1 result

  1. <script type="text/javascript"> document.onkeydown = function () { sysend.broadcast(); }; var audio1 = document.getElementById("player"); window.addEventListener("keydown", playPauseKb, false); alert(audio1.id); //document.getElementById("audio1").onkeypress = function () { document.getElementById("audio1.id").onkeydown = function playPauseKb(event) { var x = event.keyCode; console.log(x); if (x == 113) { audio.currentTime -= 5;//F9 Rewined } else if (x == 114) { //event.data.$.preventDefault(); audio.currentTime += 5;//F11 forword } else if (x == 115) { if (audio.paused) { audio.play();//F10 paly/pause } else { audio.pause() } } sysend.broadcast(); }; </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
×
×
  • Create New...