Skip to content

How to randomly choose three categories

edited April 2013 in Need Help
How would you randomly choose three categories from this container?

<div class="content_container2">
    <div class="interests_container">
        <label for="category4">
          <input type="checkbox" id="category4" name="category4">
          entertainment
        </label>
        <label for="category5">
          <input type="checkbox" id="category5" name="category5">
          sport
        </label>
        <label for="category22">
          <input type="checkbox" id="category22" name="category22">
          music
        </label>
        <label for="category36">
          <input type="checkbox" id="category36" name="category36">
          free
        </label>
        <label for="category111">
          <input type="checkbox" id="category111" name="category111">
          environment
        </label>
        <label for="category112">
          <input type="checkbox" id="category112" name="category112">
          business
        </label>
        <label for="category313">
          <input type="checkbox" id="category313" name="category313">
          education
        </label>
        <label for="category471">
          <input type="checkbox" id="category471" name="category471">
          charities
        </label>
        <label for="category473">
          <input type="checkbox" id="category473" name="category473">
          film and animation
        </label>
        <label for="category474">
          <input type="checkbox" id="category474" name="category474">
          internet
        </label>
        <label for="category477">
          <input type="checkbox" id="category477" name="category477">
          people
        </label>
        <label for="category478">
          <input type="checkbox" id="category478" name="category478">
          religion
        </label>
        <label for="category4962">
          <input type="checkbox" id="category4962" name="category4962">
          boating
        </label>
        <label for="category34322">
          <input type="checkbox" id="category34322" name="category34322">
          Comic books
        </label>
        <label for="category34323">
          <input type="checkbox" id="category34323" name="category34323">
          animals &amp; pets
        </label>
        <label for="category34324">
          <input type="checkbox" id="category34324" name="category34324">
          art &amp; literature
        </label>
        <label for="category34325">
          <input type="checkbox" id="category34325" name="category34325">
          fashion &amp; lifestyle
        </label>
        <label for="category34326">
          <input type="checkbox" id="category34326" name="category34326">
          living &amp; lifestyle
        </label>
        <label for="category34327">
          <input type="checkbox" id="category34327" name="category34327">
          news &amp; politics
        </label>
        <label for="category34328">
          <input type="checkbox" id="category34328" name="category34328">
          science &amp; technology
        </label>
        <label for="category34329">
          <input type="checkbox" id="category34329" name="category34329">
          cars &amp; motorbikes
        </label>
        <label for="category34330">
          <input type="checkbox" id="category34330" name="category34330">
          travel &amp; events
        </label>
        <label for="category34442">
          <input type="checkbox" id="category34442" name="category34442">
          comics, graphic novels &amp; film
        </label>
        <label for="category36788">
          <input type="checkbox" id="category36788" name="category36788">
          children's titles
        </label>
        <label for="category36789">
          <input type="checkbox" id="category36789" name="category36789">
          computers &amp; technology
        </label>
        <label for="category36790">
          <input type="checkbox" id="category36790" name="category36790">
          craft &amp; hobbies
        </label>
        <label for="category36791">
          <input type="checkbox" id="category36791" name="category36791">
          food &amp; cooking
        </label>
        <label for="category36792">
          <input type="checkbox" id="category36792" name="category36792">
          health &amp; fitness
        </label>
        <label for="category36793">
          <input type="checkbox" id="category36793" name="category36793">
          international titles
        </label>
        <label for="category36794">
          <input type="checkbox" id="category36794" name="category36794">
          men's interest
        </label>
        <label for="category36795">
          <input type="checkbox" id="category36795" name="category36795">
          women's interest
        </label>
    </div>
  </div>

Comments

  • SvenSven www.GSA-Online.de
    Hmm not possible im afraid. You can only set it fixed like category36795=1 or category36795=0
  • What??? something isn't possible with your scripting engine?
    :P
  • SvenSven www.GSA-Online.de
    hehe yea sorry...i can add this however to some new syntax, but for just one engine? Is that a major one, and will you share it? ;)
  • of course ill share it :)
    it's more like a doc share site.

    yudu.com
Sign In or Register to comment.