In addition you can check whether you are receiving the form element values using alert() - or even check whether method is getting called
V.K.Ram www.m7.com NitroX for Struts -----Original Message----- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 9:38 AM To: Struts Users Mailing List Subject: RE: How to convert <A href> tag to a submit button 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)" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] > 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:[EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]