kenbaum
Posts: 8
|
Posted: 11/13/2005, 8:07 AM |
|
I have a form built with .NET. I want to replace the Submit button with a hyperlink that does the submit function including validation the same way as the submit button works. I tried creating this link :
<a href="javascript:document.forms[_ctl0].submit();">Submit</a>
but it does nothing when clicked on.
Any ideas?
thanks,
Ken
_________________
Ken Baum Multimedia
http://www.kenbaum.com
web - cd - dvd - kiosks |
|
|
Venkatesan.R
|
Posted: 11/14/2005, 4:02 AM |
|
Try,
<a href="javascript:document.forms[0].submit();">Submit</a>
|
|
|
kenbaum
Posts: 8
|
Posted: 11/14/2005, 5:47 PM |
|
I have tried that and it does not work either. It appears to do something as I see the refresh button blink but it does not submit the form.
any ideas?
I have temporarily solved my problem by making the button look like a link with CSS but I would still like to figure this one out.
thanks,
Ken
_________________
Ken Baum Multimedia
http://www.kenbaum.com
web - cd - dvd - kiosks |
|
|
jeden
Posts: 20
|
Posted: 11/18/2005, 12:48 AM |
|
Hi,
I'm new with CodeCharge, anyway I used this method in a similar problem, and I think it should work.
Convert the link to a server side control (I think you have to add a runat="server", but not sure - as mentioned I'm new with CodeCharge) and try adding in the BeforeShow event the following code:
linkSubmit.Attributes ["OnClick"] = string.Format ("javascript:{0}", Page.GetPostBackEventReference(this));
This should be the same method used by asp.net to handle the form submit for the LinkButton control.
Antonio
_________________
Antonio Bello
Elapsus - Software & Solutions
http://www.elapsus.com
Developer's Corner
http://www.developer-corner.com |
|
|
bmchan
|
Posted: 12/30/2005, 11:04 PM |
|
how about....
<a href="...." onClick="document.form1.submit();">
|
|
|
|