struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Close <acl...@gmail.com>
Subject Re: Re: Why does <html:submit> work differently than <html:link action="">?
Date Wed, 28 Jul 2004 16:52:14 GMT
Jim,

heh, i would prefer not to use javascript, but i couldn't think of
another way to submit the form with links.  the form is a <html:form>
and all of the html components inside the form are Struts html
components.  the link just has an onclick parameter in it that calls
the javascript.  the javascript is simply:
document.form[0].myHiddenField.value = "myValue";
document.form[0}.submit;

if found that just using the <html:link forward= /> non of the form
values were being submitted.  i also tried the <html:link action= />
and the same occurred.  so i 'assumed' that <html:link> didn't
actually submit the form but just forwarded to another page or called
an action.  that's why i deviated to the dark side. :)

andy

On Wed, 28 Jul 2004 09:16:13 -0700, Jim Barrows <jbarrows@sssc.com> wrote:

> That's not surprising, since that's what the submit button is supposed to do.  You are
trying to thing the non-standard and completely screwy way (which imntbho in general of doing
ANYTHING in javascript).  I would suggest that you are not calling, or setting up the form
correctly in your javascript.  Works with submit, doesn't work with javascript... it's a javascript
issue, not a struts issue.
> I would suggest a javascript form might have more expertise then you might find here,
but posting the javascript would be of help for those who do know something about javascript.

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


Mime
View raw message