473,506 Members | 17,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button Onclick and OnClientClick Event should not fire together

1 New Member
In the onclientclick event of a button, I have a javascript code that returns either true or false. My question is that Onclick event of that button should fire only if onclientclick returns true otherwise not.
May 14 '12 #1
2 6485
firexfighterx
14 New Member
If you have Javascript validation is client side. The onclick event is server side. The client always runs first. Hope this helps.
May 21 '12 #2
Frinavale
9,735 Recognized Expert Moderator Expert
Please check out this article about How to use JavaScript in ASP.NET. If you still have questions after you read it, post back here :)
May 23 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
11747
by: JehanNYNJ | last post by:
I have found that the onclick does not fire for Option elements in IE. Clicking on an option only fires the Select's onclick. Can someone please confirm this? If it is so then how would we best...
4
3063
by: Chad | last post by:
I have a link (.ascx) and that generates an Add form on that page. The autopostback dropdown is within a "If Not IsPostBack Then" statement. The form that is created is all via static html in the...
3
2668
by: PJ6 | last post by:
I've added a button to a class inheriting from System.Web.UI.Control and want to handle (pass on) its click event to the page that contains it. Coming from a WinForms background, I thought this...
0
1399
by: Janet Collins | last post by:
I have a button on a user control on a form. I have the Click event wired to an event handler. The first time I click the button, the page postsback, but does not invoke my event handler. ...
11
11227
by: cindy | last post by:
I have a form, has javascript registered so a modal pops up. Button click will close form. Now I need to do an update with modal form data before it closes. I can put a second button and register...
0
3800
by: jtencate | last post by:
I am trying to add an OnClientClick event to links in an asp:Menu. I tried using a StaticItemTemplate to bind the MenuItem data to a LinkButton with an OnClientClick attribute. This works fine to...
2
2059
by: moondaddy | last post by:
I have an asp.net 2.0 application and put a html button on a web page. I double clicked on the button and it crated the event handler for me and created the stub js function for it like this: ...
17
9618
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick...
6
2352
by: erdos | last post by:
I have an asp.net 2.0 button with server and client side click events. On the first click, both events will fire. On the next click, only the client side event fires. How do I make the server...
1
2254
by: OS538DAV | last post by:
Hi, I try to raise a javascript function with the imagebutton onclientclick event but it doesn't raise on my emulator which has ie mobile 6.12.The imageButton do postback instead of calling the...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.