You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hans Braxmeier <ha...@uni-ulm.de> on 2007/04/01 12:16:09 UTC

list box onchange()


Hi,

I'm very new to tapestry and doing the first steps.

Does anybody know how to realize a list box, that opens onChange
a new html page? Everything works well with html and javascript,
but I could not get it work in tapestry.

the html code

      <form name="namelist">
      <select class="choose" name="list" size="1" onChange="getValues()">
        <option selected="selected" value="empty">select name</option>
        <option value="john">John</option>
        <option value="tom">Tom</option>
      </select>
      </form>

and js

function getValues() {
  var name =
document.form.list.options[document.form.list.selectedIndex].value;
  if (name == "empty") window.location.href = "index.html";
  else window.location.href = name + ".html";
}

Thanks for any help
Hans


--

Abteilungen SAI
und Stochastik

Universität Ulm
Helmholtzstr. 18
Raum E22
0731/50-23575

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org