|
 |
javascript thread: Validation
Message #1 by "Al Higgs" <al.higgs@b...> on Sun, 17 Feb 2002 15:23:53 -0000
|
|
This is a multi-part message in MIME format.
--Boundary_(ID_nJKOZX4XRESq/DI1NRQ8uw)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Create some control and place it on your webpage.
Then when you need to present message just instead document.write(
"Please enter something here")
you can use <your control ID>.innerHTML = "Please enter something
here";
So you can place your control whenever you want it on the page and than
change its context using innerHTML property.
Oleg.
-----Original Message-----
From: Al Higgs [mailto:al.higgs@b...]
Sent: Sunday, February 17, 2002 10:24 AM
To: javascript
Subject: [javascript] Validation
I would like to display the error message on the page rather than using
the alert function. How is this possible?
function ValidateForm() {
if (document.address.s_street.value == "") {
document.write( "Please enter something here")
return false
}
}
Problem is when the form is submitted the content of the page dissapears
and
the page simply shows Please enter something here. Is there any way of
getting this error message to appear next to the appropriate text box?
Any help appreciated
Al Higgs
$subst('Email.Unsub').
|
|
 |