The following works when submitting a form:

<html:link href="" onclick="document.forms[0].submit();return
false;">Login Test</html:link>

Thanks.

-----Original Message-----
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2003 15:39
To: 'Struts Users Mailing List'
Subject: RE: submit a form with html:link

How about:
<a href="javascript:;" onclick="...">


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: July 29, 2003 7:56 AM
To: Struts Users Mailing List
Subject: Re: submit a form with html:link




OnClick is an arbitrary string that is evaluated by the scripting
engine,
not a URL.

try replacing

onclick="javascript:'document.forms[0].submit();return
false;'"

with

onclick="document.forms[0].submit(); return false"


HTH,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure & Operations
[EMAIL PROTECTED]
(614) 213-6100




"Faisal Shoukat" <[EMAIL PROTECTED]> on 07/29/2003 07:34:32 AM

Please respond to "Struts Users Mailing List"
      <[EMAIL PROTECTED]>

To:   "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc:

Subject:  submit a form with html:link




Hi,

I am trying to submit a form by using a link. I have looked through the
emails already on this and am using the following code from a previous
mail:

<html:link href=""
onclick="javascript:'document.forms[0].submit();return
false;'">Login</html:link>

however when I click on the link nothing happens?  Does anybody know
why?

Thanks in Advance
Faisal


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









This transmission may contain information that is privileged,
confidential
and/or exempt from disclosure under applicable law. If you are not the
intended
recipient, you are hereby notified that any disclosure, copying,
distribution,
or use of the information contained herein (including any reliance
thereon) is
STRICTLY PROHIBITED. If you received this transmission in error, please
immediately contact the sender and destroy the material in its entirety,
whether
in electronic or hard copy format. Thank you.


---------------------------------------------------------------------
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to