You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tony Smith <qu...@yahoo.com> on 2005/07/23 04:23:15 UTC
html:select onchange
I have html:select in my jsp. When user make a new
seletion in the select, I could like to go ot a new
page and use the current selected item as parameter.
How can I do it?
Here is my jsp:
<html:select name="myform" property="myfield"
onchange="location.href='mynewpage.do?para=XXXXXX'">
...
</html:select>
XXXXX should be the new selected item in this select
control which is just select by the user and triggered
this event.
Thanks,
--- Tony Smith <qu...@yahoo.com> wrote:
> If I have a html:form, can I have another html:form
> inside it and pointed to a different action?
>
> For example:
>
> <html:form action="outter.do">
> ...
>
> <html:form action="inner.do">
> ...
> </html:form>
> </html:form>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: html:select onchange
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Tony Smith" <qu...@yahoo.com>
> Thank you very much for your post. I agree with you
> and some user were complaining about the effect your
> mentioned. My situition is that I have two selects,
> once the users update one, I need to populate the
> other with correspondent options. If I do not go to
> another page, what is the best way to do? WOuld you
> please give me some hits? THanks, again.
Not long ago I would have said your two options were to submit the form and
re-display it with the new contents in the second select list, or else put
everything in the page and make the changes with client side scripting.
But now, there's AJAX, and you can replace individual parts of the page
seemingly by magic. Someone who actually knows how it works will have to
comment, but you can take a look at Frank's "Java Web Parts" project for an
example: http://javawebparts.sourceforge.net/
I don't quite see how you'd ask the Struts framework to render just one
<html:select> tag without letting it process the entire page so it would
have the information from the enclosing <html:form> tag.
FWIW, my original suggestion can be reduced to:
onChange="'mynewpage.do?para='+value;"
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: calender in jsp
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Tony Smith" <qu...@yahoo.com>
> My jsp user interface contains one Textfield and
> button beside the textfiled. If that button is clicked
> , a calender should be displayed and the selected date
> in that particular calender is to be displayed in the
> textfield.
> how to do this in JSP?
This one's easy. You Google for 'JavaScript Calendar' and pick the one you
like best. ;) Let someone *else* deal with all the cross-browser
compatibility problems.
I'm using an apparently abandoned one that Robert Husted wrote in 1999. If
it ever breaks, I'll probably switch to:
http://www.dynarch.com/projects/calendar/
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
calender in jsp
Posted by Tony Smith <qu...@yahoo.com>.
My jsp user interface contains one Textfield and
button beside the textfiled. If that button is clicked
, a calender should be displayed and the selected date
in that particular calender is to be displayed in the
textfield.
how to do this in JSP?
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: html:select onchange
Posted by Tony Smith <qu...@yahoo.com>.
Thank you very much for your post. I agree with you
and some user were complaining about the effect your
mentioned. My situition is that I have two selects,
once the users update one, I need to populate the
other with correspondent options. If I do not go to
another page, what is the best way to do? WOuld you
please give me some hits? THanks, again.
--- Wendy Smoak <ja...@wendysmoak.com> wrote:
> From: "Tony Smith" <qu...@yahoo.com>
> >
> > <html:select name="myform" property="myfield"
> >
> onchange="location.href='mynewpage.do?para=XXXXXX'">
> > ...
> > </html:select>
> >
>
> http://www.javascriptkit.com/jsref/select.shtml
>
>
onChange="location.href='mynewpage.do?para='+options[selectedIndex].value;"
>
> Keep in mind that this can be *very* annoying in
> terms of UI design. The
> user doesn't get a chance to correct a mistake; he
> changes one thing and
> suddenly he's off on some other page.
>
> --
> Wendy Smoak
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: html:select onchange
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Tony Smith" <qu...@yahoo.com>
>
> <html:select name="myform" property="myfield"
> onchange="location.href='mynewpage.do?para=XXXXXX'">
> ...
> </html:select>
>
http://www.javascriptkit.com/jsref/select.shtml
onChange="location.href='mynewpage.do?para='+options[selectedIndex].value;"
Keep in mind that this can be *very* annoying in terms of UI design. The
user doesn't get a chance to correct a mistake; he changes one thing and
suddenly he's off on some other page.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org