struts-user mailing list archives

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

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";

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. :)


On Wed, 28 Jul 2004 09:16:13 -0700, Jim Barrows <> 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:
For additional commands, e-mail:

View raw message