CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 How to replace a Submit button with a Submit Hyperlink

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
bmchan
Posted: 12/30/2005, 11:04 PM

how about....
<a href="...." onClick="document.form1.submit();">

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.