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?

    Should I put the variable above the function? Maybe below the } of the function?
  2. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I'm not finding an exact variable of "Telephone Answered". Here's what I find. function receiverRaised(){ if(allowDial == false) { telephoneAnswered() } if(allowDial == true) { dialTone.play(); } else { offHook (); timeoutHowler.play(); } }...
  3. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Are you referring to the "Hook Status" variable? Should the "Telephone Answered" variable be defined the same way? I'm confused!
  4. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    What shall I put for the variable?
  5. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Now I've got this error.
  6. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Yes I believe so. Does this look right? case 32: button.addEventListener("click", function() { toggleLineStatus();
  7. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    I want to be able to toggle the hookswitch by pressing the spacebar.
  8. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Are you thinking something like: <html> <div role="switch" aria-labelledby="id-label"> <label for="Hookswitch Status" <button type="button" role="switch" id="hookswitch">Hookswitch Status: <span class="hookStatus off"> </span> <span class="hookStatus on">...
  9. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    What kind of control would that be? A button? A switch? A checkbox? I'm confused! It just says the parameter is a "span".
  10. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    The function is used to toggle between "On Hook", and "Off Hook" by pressing Spacebar. When "Off Hook", the Dial Tone plays. When on hook, all audio stops. the "RingTelephone" function may be triggered when On Hook. When answering by pressing Spacebar, you can use your microphone to talk, like...
  11. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    This one? function toggleLineStatus() {
  12. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    The "Hookswitch" switch, which is supposed to be toggled when you press the spacebar, is supposed to play certain sounds when switched on and others when switched off.
  13. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Should I make one?
  14. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    There's a function with that name, and an element called "hookswitchStatus", which is on the hookswitch itself. <div role="switch" aria-labelledby="id-label"> <label for="Hookswitch Status" <button type="button" role="switch" id="hookswitch">Hookswitch Status: <span...
  15. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    It's on Line 102:10, which is the one that contains that code.
  16. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    document.getElementById('toggleLineStatus').onclick=function(){
  17. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    'toggleLineStatus' is inside the parentheses. Is that the one you were thinking of? There's also another one that says Here's a snippet of code that contains those "document" lines. document.getElementById('toggleLineStatus').onclick=function(){ toggleLineStatus() }; function...
  18. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    Could you please explain what you mean?
  19. Annabelle5893

    Playing Audio Using Keystrokes: Is It Possible?

    At the end of the .html file just before the </body> code. . Should it be in a separate .js file instead?
Back
Top Bottom