struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <jakartau...@yahoo.com>
Subject RE: How to convert <A href> tag to a submit button
Date Fri, 11 Jun 2004 16:37:32 GMT
I think your problem is that the link itself goes somewhere instead of just
calling the JS function.  Why don't you try something like

<html:link href="javascript:attSubmit()">attName</html:link>

or even just a regular, non-struts tag, link?

--- "PADALA, SANDHYA (SBCSI)" <sp4835@sbc.com> wrote:
> 
> 
> Hello Wendy,
> 
> Thank you for replying to my mail. 
> What I have tried is something like this
> 
> <html:link page="/attachment.do" onclick="attSubmit()">	
> attName
> </html:link>
> 
> <SCRIPT language="javascript">
> function attSubmit(ID)
> {
> 	document.forms[0].action="/attachment.do";
> 	document.forms[0].submit();
> }
> </SCRIPT>
> 
> Can you please tell me what I am doing wrong.
> 
> Thank you,
> Sandhya
> 
> -----Original Message-----
> From: Wendy Smoak [mailto:Wendy.Smoak@asu.edu] 
> Sent: Friday, June 11, 2004 9:37 AM
> To: Struts Users Mailing List
> Subject: RE: How to convert <A href> tag to a submit button
> 
> 
> > From: PADALA, SANDHYA (SBCSI) [mailto:sp4835@sbc.com] 
> > I tried using onClick java script method in the <html:link> tag and in
> > the method  implementation I have done document.forms[0].submit().NO
> > luck. I was not successful.
> 
> Why don't you post what you tried that didn't work?  That's the solution
> I use, and I have lots of links that set hidden form fields and then
> submit the form.  They work fine.
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


Mime
View raw message