struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel Belingueres" <belingue...@gmail.com>
Subject Re: struts2 <s:select/> How to get a option item which can invoke a action or redirect another URL
Date Thu, 04 Sep 2008 02:00:44 GMT
Don't know if I understand correctly your question, but from what I
understand you want a javascript function that redirect to some web
site when the option is selected?
There are plenty of examples in the web for doing that [1].

[1] http://www.google.com.ar/search?hl=es&q=javascript+select+redirect&btnG=Buscar&meta=

2008/9/3 Mead Lai <laiqinyi@gmail.com>:
> Hi,
> struts2 <s:select/>How to get a option item which can invoke a
> javascript-function?
>
> the final HTML code show to browser is like following:
> <select name="redirect-select">
> <option value="http://www.cnn.com">cnn</option>
> <option value="http://www.bbc.com">bbc</option>
> <option value="http://www.facebook.com">book</option>
> <option value="more website" onclick="javascript:alert('invoke another
> action, get more website');">more website</option>
> </select>
>
> how to get the last option item?
> <option value="more website" onclick="javascript:function();">more
> website</option>
> it can invoke a action or redirect another URL?
> It's Ajax Tag can do this?
>
> --
> BestRegards,
> Mead
> http://yayisoft.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message