473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to execute client-side code _after_ client-side validation?

Hi,

I'd like to display (i.e. make visible) a label after a submit button is
clicked but only if the client-side validation is successful. If I did not
care about the validation then I'd simply modify style.display of the label
in my onclick (OnClientClick) script. The problem is that my script will
execute before the validation script.
Is there a way to execute my custom script after the validation takes place?

Thanks,
Bogdan

Jun 27 '08 #1
2 1470
use ClientSCriptManager.RegisterOnSubmitStatement

-- bruce (sqlwork.com)

Bogdan wrote:
Hi,

I'd like to display (i.e. make visible) a label after a submit button is
clicked but only if the client-side validation is successful. If I did not
care about the validation then I'd simply modify style.display of the label
in my onclick (OnClientClick) script. The problem is that my script will
execute before the validation script.
Is there a way to execute my custom script after the validation takes place?

Thanks,
Bogdan
Jun 27 '08 #2
Bruce,

Thanks for the reply. Your suggestion only partially worked for me. I have
a RequiredFieldValidator and RegularExpressionValidator attached to fields.
If the former fails than my onsumbit script is not executed. Unfortunately,
this is not the case for the regex validator - my onsubmit is executed
regardless if the validator fails or not. I tested it in IE, FireFox, and
Safari and got similar results.

Is OnSubmitStatement supposed to execute AFTER validators and only if the
validators are successful? I can't find any reference to it in the on-line
docs. I'd appreciate any links.

Thanks again,
Bogdan
"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
use ClientSCriptManager.RegisterOnSubmitStatement

-- bruce (sqlwork.com)

Bogdan wrote:
>Hi,

I'd like to display (i.e. make visible) a label after a submit button is
clicked but only if the client-side validation is successful. If I did
not care about the validation then I'd simply modify style.display of the
label in my onclick (OnClientClick) script. The problem is that my
script will execute before the validation script.
Is there a way to execute my custom script after the validation takes
place?

Thanks,
Bogdan

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sheila King | last post by:
I have searched for an answer to this question on the comp.lang.python archives at Google Groups, and also looked through the (sparse) MySQLdb documentation, and cannot confirm for a FACT what I...
2
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
4
by: Jill Graham | last post by:
Hi, I'm using an access database and found following problem : I have a table X with 2 records : record 1 & record 2. I execute following procedure with 2 steps : 1. The procedure deletes...
2
by: Matt | last post by:
I want to exexute stored procedure in ASP, but it has error "Microsoft VBScript compilation (0x800A0401) Expected end of statement" on line (1). The stored procedure "sp_emp" contain "select *...
6
by: PiGei | last post by:
hi all, I'm trying to use server.execute statement to include in an asp page another asp page with a parameter. That's because I've a parametric query in the second asp page and I have to pass...
7
by: William Gill | last post by:
I have been trying to pass parameters as indicated in the api. when I use: sql= 'select * from %s where cusid = %s ' % name,recID) Cursor.execute(sql) it works fine, but when I try : sql=...
9
by: PyPK | last post by:
Hi if I have a function called tmp=0 def execute(): tmp = tmp+1 return tmp also I have def func1(): execute() ....
5
by: Gustavo Randich | last post by:
Hello, I'm writing an automatic SQL parser and translator from Informix to DB2. Now I'm faced with one of the most difficult things to translate, the "foreach execute procedure" functionality...
8
by: johnlichtenstein | last post by:
I am using cx_Oracle and MySQLdb to pull a lot of data from some tables and I find that the cursor.execute method uses a lot of memory that never gets garbage collected. Using fetchmany instead of...
1
by: gglegrp112 | last post by:
Is it possible to send an array as a parameter for an execute method in dbapi2 module? I'm using adodbapi and try to perfrom the following SQL query: select * from item where storeid in ('01',...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.