struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <j...@wendysmoak.com>
Subject Re: Re: Why does <html:submit> work differently than <html:link action="">?
Date Wed, 28 Jul 2004 17:12:31 GMT
From: "Michael McGrady" <mike@michaelmcgrady.com>

> Why in Heaven's name would you want to submit a form with a link?

This is not as odd as you seem to think.  Case in point... I have a tabbed
menu, and each tab has a [Struts] form on it.  The text on each tab is a
hyperlink, and I  *have* to make the form submit when the user clicks to
switch to another tab, or I lose whatever they've typed on the form.  I do
it with JavaScript:

function standardTab() {
 document.forms[0].mode.value="<fmt:message key="tab.standard"/>";
   document.forms[0].target="_self";
 document.forms[0].submit();
}

-- 
Wendy Smoak



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


Mime
View raw message