Web Analytics Made Easy -
StatCounter onselect option value - CodingForum

Announcement

Collapse
No announcement yet.

onselect option value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • onselect option value

    how can i do >>>


    <select onselect="window.location='?id=this.value';">
    <option value="0">zero</option>
    <option value="1">one</option>
    <option value="2">two</option>
    </select>

    to get >>>

    [currentpage.htm]?id=x

    x = option selected

    .........................................I know my code is horrible :-))

    thanks for helping ............................................................

  • #2
    <select onchange="location.href='currentpage.htm?id='+this.options[this.selectedIndex].value">
    <option value="0">zero</option>
    <option value="1">one</option>
    <option value="2">two</option>
    </select>
    Glenn
    vBulletin Mods That Rock!

    Comment


    • #3
      without the page

      and it works also without the page

      <select onchange="location.href='?id='+this.options[this.selectedIndex].value">
      <option value="0">zero</option>
      <option value="1">one</option>
      <option value="2">two</option>
      </select>

      thank you

      Comment

      Working...
      X