Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How about this? case "*8217147339969": var pickup*8217147339969=new Audio('device-conference.mp3'); pickup*8217147339969.addEventListener("click", function() { pickup*8217147339969.play(); //remove the space before the asterisk })...
  2. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Did I write that code right when I put two } at the end of the "if" statement?
  3. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Is it this part? if(timesRung>1) { setTimeout(response,700); } }
  4. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    You say the "ring" function is missing a } at the end of the function itself. Is that supposed to be between the ringingTone.play(); and the timesRung++; codes?
  5. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I removed the "break" from the "default" statement, and I got an error of "expected expression: got 'default", on line 410:9. Here's the code I fixed. default: hasDialedNumber = false; } Here's a screenshot.
  6. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Now it says there's an error of an "Unexpected Expression of 'default:'" at line 410:9. Here's the code: default: hasDialedNumber = false; break; } Should there be an { at the beginning of that "Default" statement?
  7. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How's this look? document.onkeydown = function (event) { switch (event.keycode) { case 32: button.addEventListener('click', function() { toggleLineStatus(); }); break; case 49,97...
  8. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    So I should put a second } after the first one at the end of that code?
  9. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How's this version? document.onkeydown = function (event) { switch (event.keycode) { case 32: button.addEventListener('click', function() { toggleLineStatus(); }); break; case 49,97...
  10. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I added the ) where they were missing. I hope I got 'em all! <script> //grab the button 'hookSwitch' var hookSwitch = document.querySelector('button.hookSwitch'); //create an event listener for a click event hookStatus.addEventListener("onclick", function(){ //inside of the callback...
  11. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Now it says there's an error where an "unlabeled break must be inside loop or switch". Here's the specific code at and near the line 454:13. case "0": var operatorPickup=new Audio('callResponses/OperatorAnswer.wav'); //this function call is missing a closing...
  12. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    So I'm guessing that what I should do now is make all the case statements the same format as that one I just demonstrated?
  13. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How about this? case "*8217147339969": var pickup*8217147339969=new Audio('device-conference.mp3'); pickup*8217147339969.play(); break;
  14. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    So you're saying it should be this? case "*8217147339969": var pickup*8217147339969=new Audio('device-conference.mp3'); pickup*8217147339969.play(); ) break;
  15. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How's this? case "*8217147339969": var pickup*8217147339969=new Audio('device-conference.mp3'); pickup*8217147339969.play(); }) break;
  16. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I'm guessing there shouldn't be a ; at the end, just this: case "*6717147339969": var pickup714block=new Audio('callResponses/reject2-xxx-fleet.mp3') pickup714block.addEventListener("click", function() { timeoutHowler()...
  17. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Is it the part where you say: //this function call is missing a closing parenthesis for the function itself at the end, just before the break"?
  18. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I'm reading this file in Notepad, and there's a comment that says, "Remove this, it is not needed". I found it next to a } at the end of this function. Does this version look better? case "*8217147339969": var pickup*8217147339969=new Audio('device-conference.mp3')...
  19. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How's this one look? <script> //grab the button 'hookSwitch' var hookSwitch = document.querySelector('button.hookSwitch'); //create an event listener for a click event hookStatus.addEventListener("onclick", function(){ //inside of the callback function for click event listener, add the...
  20. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Hmm that's strange. Now it says there's an error at line 431:5. The error says: SyntaxError: expected expression, got '}' Here's the function that's associated with this error. Actually it's two functions. Should they both be just one function? I'm confused! function busy() { busyTone()...
Back
Top Bottom