473,651 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1479
use ClientSCriptMan ager.RegisterOn SubmitStatement

-- 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 RequiredFieldVa lidator and RegularExpressi onValidator 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 OnSubmitStateme nt 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******** ********@TK2MSF TNGP04.phx.gbl. ..
use ClientSCriptMan ager.RegisterOn SubmitStatement

-- 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
6819
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 think I know. Looking for affirmation before I go "assuming" something and getting myself into trouble somewhere along the line... Here is what I *think* I know...let me know if I'm wrong, for crying out loud!!!
2
5045
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, sometimes not. From mysql: mysql> show databases; +-----------+ | Database |
4
5321
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 records 1 : connection.execute "delete from X record 1" 2. The procedure adds record 1 again using the recordset object.
2
13613
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 * from Employee;" <% Dim objRS, sqlStmt set objRS = Server.CreateObject("ADODB.Recordset") Dim conn Set conn = Server.CreateObject("ADODB.Connection")
6
5287
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 the value <% Server.Execute("result.asp?key=2") %> I can't do it. That's the error message I get:
7
8653
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= 'select * from %s where cusid like %s ' Cursor.execute(sql,(name,recID))
9
9416
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
12408
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 provided by Informix. This is the problem: the execution of the translated SQL leaves the rows in the temp table correctly but raises error SQL0480N. It's very simple to try it: ------------
8
18780
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 fetchall does not seem to make any difference, since it's the execute that uses memory. Breaking the query down to build lots of small tables doesn't help, since execute doesn't give its memory back, after reading enough small tables execute...
1
1973
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', '02') When I use direct string formating it works: a=('01','02')
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.