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

150
Views
How to group actions associated with <span id=

I attach the relevant extract of the code I am using. What I want to do with the 3 lines which begin "<span id =" is:

  1. to call ItemJ and then use the Item1, Item2 and Item3 links immediately below ItemJ in the section.
  2. to call ItemK and then use the Item1, Item2 and Item3 links immediately below ItemK in the section
  3. Ditto for the third line and ItemL.

The trouble is that it always picks the third group for Item1/2/3 - as I would expect as currently coded.

So is there a way of getting each "<span id=" line to select the group of Item1/2/3 associated with the IndexJ/K/L group I am calling. For various reasons I don't want to give the Item1/2/3 different numbers. Is there a kind of "If" statement I can use which will always select the group of Item/1/2/3 I want?

    <span id="ItemJ"></span><P>
    <span id="ItemK"></span><P>
    <span id="ItemL"></span><P>

    <script>

    document.getElementById("ItemJ").innerHTML = xBB
    document.getElementById("Item1").innerHTML = Bob110
    document.getElementById("Item2").innerHTML = ZZ1
    document.getElementById("Item3").innerHTML = RadioDGH

    document.getElementById("ItemK").innerHTML = xCC
    document.getElementById("Item1").innerHTML = Bob125
    document.getElementById("Item2").innerHTML = ZZ2
    document.getElementById("Item3").innerHTML = QARadio

    document.getElementById("ItemL").innerHTML = xAA 
    document.getElementById("Item1").innerHTML = Bob135
    document.getElementById("Item2").innerHTML = ZZ3
    document.getElementById("Item3").innerHTML = RadioDGH

    </script>
about 4 years ago · Juan Pablo Isaza
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!