Thread: js validate
Results 1 to 3 of 3
Related
-
The doctype validator. Does browser validate the html content via doctype directive? Forum: HTML Forum
Replies: 9 -
How to validate pieces of a word or a word itself in a array? Forum: Javascript Forum
Replies: 2 -
Validate Drop Down Menu Forum: Javascript Forum
Replies: 5 -
Validate Question Forum: HTML Forum
Replies: 4
-
02-04-2005, 03:06 AM #1
js validate
hi,
i'm looking validate script for....(document.insert.location1.checked == false) {
document.insert.student1.style.visibility = "hidden";
else {
document.insert.student1.style.visibility = "";
i want "student1" to be validated , only if i click on location1,
i tryed this script but , it checks "student1 ", before i click on "location1"
if(document.insert.location1.cheked!="")
{
document.insert.student1.value!="";
}
else { alert("student1 is not filled");}Last edited by f&m; 02-04-2005 at 03:14 AM.
-
02-04-2005, 07:30 AM #2
Hi, welcome to the forum.
You need to put this script into an event, the event being theform being submitted.
First, make your code a function so it can be called at any time:
Code:function check_loc1() { if (document.insert.location1.checked) { if (document.insert.student1.value=='') { alert('Student1 is not filled'); return false; } return true; } return true; }
Code:onsubmit="return check_loc1();"
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
02-04-2005, 09:19 AM #3
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum