Hi Hans,

IMHO this is a nice candidate for the @EventListener.
Check out http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html for 
more details and examples.


-----Original Message-----
From:   Hans Braxmeier [mailto:[EMAIL PROTECTED]
Sent:   Sun 01/04/2007 11:26
To:     users@tapestry.apache.org
Cc:     
Subject:        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>

the js code:

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


________________________________________________________________________
This e-mail has been scanned for all known viruses.




Note:__________________________________________________________________
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
________________________________________________________________________
This e-mail has been scanned for all known viruses.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to