struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul McCulloch <paul.mccull...@axiossystems.com>
Subject RE: Re: Why does <html:submit> work differently than <html:link a ction="">?
Date Wed, 28 Jul 2004 17:26:49 GMT
> document.form[0].myHiddenField.value = "myValue";
> document.form[0}.submit;

There are two or three typos there. I'd write this as:

document.forms[0].myHiddenField.value = "myValue";
document.forms[0].submit();

Paul



> -----Original Message-----
> From: Andrew Close [mailto:aclose@gmail.com]
> Sent: 28 July 2004 17:52
> To: Struts Users Mailing List
> Subject: Re: Re: Why does <html:submit> work differently than 
> <html:link
> action="">?
> 
> 
> 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
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee
indicated in this message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to Internet email messages
of this kind, please advise us immediately. Opinions, conclusions and other information expressed
in this message are not given or endorsed by my Company or employer unless otherwise indicated
by an authorised representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via
electronic mail attachments we cannot guarantee that attachments do not contain computer virus
code.  You are therefore strongly advised to undertake anti virus checks prior to accessing
the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for loss or damage
howsoever caused.
**********************************************************************


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


Mime
View raw message