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?

    Here's another error. And here's the corresponding code. function dialToneTimedOut() { allowDial=false; timeoutHowler(); if(DialToneTimedOut == true) { timeoutHowler.play(); timeoutHowler.currentTime=0; } }
  2. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I wonder if this is what you're thinking of. //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...
  3. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How about this one? //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 on/off...
  4. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How's this version? //grab the button 'hookSwitch' var hookSwitch = document.querySelector('button.hookSwitch'); //create an event listener for a click event //inside of the callback function for click event listener, add the on/off classes to the span like this: //grab the span element var...
  5. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I bet one of the pieces of missing logic is the statement: switch (event.keycode) { case 32: toggleLineStatus(); break;
  6. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I hope this looks right to you. var hookSwitch = document.querySelector('button.hookSwitch'); //create an event listener for a click event //missing logic //inside of the callback function for click event listener, add the on/off classes to the span like this: //grab the span element var...
  7. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I manually typed your code in, and this is what I got.
  8. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    How's this? //grab the button 'hookSwitch' var hookSwitch = document.querySelector('button.hookSwitch'); //create an event listener for a click event //inside of the callback function for click event listener, add the on/off classes to the span like this: //grab the span element var...
  9. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    The lines that say things like: //inside of the callback function for click event listener, add the on/off classes to the span like this: //grab the span element
  10. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Would I need all the stuff within the slashes? Or is that not necessary for the programming.
  11. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I'm looking to change the labels based on the toggle of the switch. If there is a specific place where the labels should be located, where should it be?
  12. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I wonder, how would I change the label of this switch, based on whether it is on or off? I want it to be labeled "On Hook" when switched off, and "Off Hook" when switched on. <div role="switch" aria-labelledby="id-label"> <label for="Hookswitch Status" <button type="button"...
  13. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I know this may sound strange, but as someone who is sight challenged, what I've done with the indents is attempt to line things up with each other. Is there something I'm doing wrong?
  14. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Here's another screenshot. I've been fixing the codes, manually typing the fixes you've told me about. Now it says there needs to be a } on line 374:4
  15. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I tried manually typing out everything you wrote in that code, down to the letter, but now it says that there's an "unexpected token of a ) on line 401:13". This is weird, since I don't have any other programs going on besides my JAWS (Job Access With Speech) screenreader and Microsoft Edge.
  16. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Now there's an "unlabeled break" at line 399:12. function response(){ switch(number){ case "0": var operatorPickup=new Audio('callResponses/OperatorAnswer.wav'); operatorPickup.addEventListener("ended"), function(){ number=prompt("Operator...
  17. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I pressed Control+Shift+I to go to the console, pressed enter on the link to the line, and here's a screenshot.
  18. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    On line 399, there seems to be the error of "unlabeled break must be inside loop or switch"
  19. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I think it's this one. switch(number){ case "0": var operatorPickup=new Audio('callResponses/OperatorAnswer.wav'); operatorPickup.addEventListener("ended"), function(){ number=prompt("Operator, your number please? (Numbers only; enter 'police'...
Back
Top Bottom