Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7692009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:45:14+00:00 2026-05-31T20:45:14+00:00

I have looked on Google, and everywhere in the forums. Just learning JavaScript, so

  • 0

I have looked on Google, and everywhere in the forums. Just learning JavaScript, so any help is appreciated. When I put .wav in the parameters it says error, don’t know if that makes a difference anyway.

In the head:

<script type="text/javascript">
  function playSound(cellowav) {
    document.getElementById("dummy").innerHTML=
       "<embeded src=\""+cellowav.wav+"\" hidden=\"true\" loop=\"false\" />
  }
</script>

In the body:

<span id="dummy"></span>
<p onmouseover="playsound('cellowav.wav');">
  <img src="smiley.png" border="0" alt="smiley" />
</p>

Okay, I found that yes the cellowav doesn’t belong in the parameter, or the string and the sound will play automatically with the embed tag in html. I was missing the closing -"- in the string fixed that. Changed the functions parameters from (cellowav) to (soundfile) and in the string + cellowav + to

  • soundfile +.

     <script language="javascript" type="text/javascript">
     function playSound(soundfile) {
     document.getElementById("dummy").innerHTML=
     "<embed src=\""+soundfile+"\" hidden=\"true\" autostart=\"true\"
     loop=\"false\" />";
     }
     </script>
    
    
     <span id="dummy"></span>
     <p onmouseover="playSound('cellowav.wav');"><img src="smiley.png"  
     alt="smiley"></p>
    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:45:15+00:00Added an answer on May 31, 2026 at 8:45 pm

    You’re missing a " at the end of innerHTML=... in your function.

    Furthermore you can’t include cellowav.wav that way. You need to put in the url to the file there.

    Should be looking something like this:

    <script type="text/javascript">
      function playSound(cellowav) {
        document.getElementById("dummy").innerHTML=
           "<embed src=\"" + cellowav + "\" hidden=\"true\" loop=\"false\" />";
      }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just have been looked into Google's source code and I saw that the
I have looked up Google and Spring documentation but can not find any thing
I have this simple hello world version of a google map api javascript v3
I have looked on google for answers but I am not satisfied. My Logic:
I have looked ALL over (google searched) and I cannot for the life of
The code below is really annoying me I have looked on stackoverflow and google
Just to preface, I am new to iOS development. I have looked around for
I have looked a lot on google for answers of how to use the
I have looked at the IronPython website and done various Google searches as well
I wonder if you can help me with this one. I have looked on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.