Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
How to get radio buttons to work within document.getElementById

The html code in the "document.getElementById" section will work when it is stand along, but although it produces the radio buttons when nested inside "document.getElementById" the buttons don't work. I wonder if its to do with nesting the "document.getElementById"

     <span id="Item1"></span>

     <script>

     document.getElementById("Item1").innerHTML = '<center><table bgcolor="#ddceff" width="550" border="2"><TR><TD><center>TEST<BR><audio id="player" src="https://media.radiodgh.com:8443/stream"></audio><div><button onclick="document.getElementById("player").play()">Play</button><button onclick="document.getElementById("player").pause()">Pause</button><button onclick="document.getElementById("player").volume += 0.1">Vol +</button><button onclick="document.getElementById("player").volume -= 0.1">Vol -</button></div></center></font></center></TD></TR></TABLE>'

     </script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I needed to use the backslash ( \ ) escape character to prevent JavaScript from interpreting a quote as the end of the string. Hence the references to ('player') have to be ([backslash]'player[backslash]').

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!