Hi!
I've got this JSP which is for password hint/email requests ... of course,
there are two buttons that need to act on one text field input. The way my
controller works (Model 2 architecture), is to have an action specified in
the servlet's parameters. Typically I just specify the ACTION="<%=blah
blah%>" in the <FORM> element, but in this case, the action depends on which
button is pressed.
Any of you guys have some advice on how to implement this? I am trying the
javascript route, but have had no luck with it:
function submitAction(form, action)
{
form.<%=YZConfig.PARAM_ACTION%>=action;
form.submit();
}
<input type="button" name="Button22" value="Get Hint"
onClick="submitAction(this.form, '<%=YZConfig.ACTION_PWDHINT%>')">
<input type="button" name="Button2" value="E-mail Password"
onClick="submitAction(this.form, '<%=YZConfig.ACTION_SENDLOGIN%>')">
Any help is greatly appreciated!
Thanks
-- Jake
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets