|
 |
asp_web_howto thread: Fields and button freeze
Message #1 by "Sandra" <slau@p...> on Wed, 27 Jun 2001 22:33:23
|
|
Hi,
The form for my ASP SQL query in another page requires both fields to be
filled in, but I don't know how to disable the button until both fields
have data.
Any suggestions?
Thanks in advance,
Sandra
Message #2 by "Indos Computer Services Ltd" <AlanF@i...> on Thu, 28 Jun 2001 08:07:21 +0100
|
|
Trap the error at the client side. So that the form cannot be submitted
until both fields have some data in
regards
Alan
-----Original Message-----
From: Sandra [mailto:slau@p...]
Sent: 27 June 2001 22:33
To: ASP Web HowTo
Subject: [asp_web_howto] Fields and button freeze
Hi,
The form for my ASP SQL query in another page requires both fields to be
filled in, but I don't know how to disable the button until both fields
have data.
Any suggestions?
Thanks in advance,
Sandra
Message #3 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 28 Jun 2001 10:29:42 +0100
|
|
make the button disabled initially,
<INPUT TYPE=3D"BUTTON" ID=3D"button1" ... DISABLED>
then have an onBlur routine on each field that goes something like this
function enableButton(){
=09
if((document.forms(0).field1.value!=3D"")&&(document.forms(0).field2.val
ue!=3D""
)){
document.forms(0).button1.disabled=3Dfalse;
} else {
document.forms(0).button1.disabled=3Dtrue;
}
}
(Although I'm not sure if Nescape supports the disabled property)
-----Original Message-----
From: Sandra [mailto:slau@p...]
Sent: 27 June 2001 23:33
To: ASP Web HowTo
Subject: [asp_web_howto] Fields and button freeze
Hi,
The form for my ASP SQL query in another page requires both fields to
be
filled in, but I don't know how to disable the button until both fields
have data.
Any suggestions?
Thanks in advance,
Sandra
|
|
 |