Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2005, 12:43 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default onclick event for a submit button

Hi experts,

I have a Submit Button,

<input type="submit" name="Button1" value="Button" id="Button1" />

what I want to do is to call onclick event for this button I can't change above tag because it is the output of my ASP.NET page

I know document.Form1.submit(); but I want something else

I tried document.Form1.Button1.submit(); but it doesn't work

any opinion?

Thanks in advance.

_____________
Mehdi.
software student.
__________________
_____________
<font color=\"teal\"><font size=\"1\"><b>Mehdi.
software student.</b></font id=\"size1\"></font id=\"teal\">
 
Old April 1st, 2005, 12:57 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

never mind,

in Page_Load I added,

Button1.Attributes.Add("onclick","__doPostBack('Bu tton1','')");

then at client side I called

document.Form1.Button1.onclick();

Thanks anyway.

_____________
Mehdi.
software student.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help :asp.net2.0 button onclick event handle ousys Visual Studio 2005 2 November 11th, 2007 02:57 AM
Make a image button as default submit button toshi ASP.NET 1.0 and 1.1 Basics 1 June 1st, 2006 05:25 AM
radio button onClick submit form crmpicco HTML Code Clinic 1 June 14th, 2005 08:32 AM
onclick event bjackman Access 6 July 15th, 2004 06:54 AM
onclick event pigtail Javascript 1 April 11th, 2004 03:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.