ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1735
Number of posts: 3307

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to call 'JavaScript' function which is at client side ? Posted by kishore_peddi on 11 Jul 2003 at 7:14 AM

Hi,

Good day. I am having one client-side function in 'JavaScript'. How to call that one in server-side ?

For example, I am having a JavaScript function at client-side of validating fields. When submit button is clicked then the function must be called in ASP.NET and if success then the form should submit otherwise it must throw an error.

Advance ThanX for your time & patience.

Bye...
Cheers
Kishore
Report
Re: How to call 'JavaScript' function which is at client side ? Posted by raymcd on 11 Jul 2003 at 10:13 AM
:
: Hi,
:
: Good day. I am having one client-side function in 'JavaScript'. How to call that one in server-side ?
:
: For example, I am having a JavaScript function at client-side of validating fields. When submit button is clicked then the function must be called in ASP.NET and if success then the form should submit otherwise it must throw an error.
:
: Advance ThanX for your time & patience.
:
: Bye...
: Cheers
: Kishore
:

You have to add the func call to the onclick attribute of the button.

onclick="return YourFunc();"

It's tricky 'cause the render method of the server control will write that attribute. You need to modify the attribute.

-Ray



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.