
March 15th, 2002, 12:25 AM
|
|
Junior Member
|
|
Join Date: Mar 2002
Location: Vancouver Island, BC Canada
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Validation Forms "JavaScript"
Im working with a Javascript validation (form) and trying to get some areas to work, and seem to be having difficulty doing it. What it is that i want to accomplish is this:
I have a drop down list "say called SurfaceArea" and it drops down a list of items, and at the bottom it has a selection "other". This is a mandatory item.
Under the drop down list there is a text box named "OtherSurfaceArea". But its only mandatory if "other" is selected in the above list.
Does anyone know the code for something like this in javascript. Here is what I have now:
}
// Check for Surface Area
if (document.frmEnquiry.SurfaceArea.value == "" || document.frmEnquiry.SurfaceArea.value == "Other")
{
errorMsg += "\n\tEnter Info into Other Area \t ";
}
// Check for Other Surface Area
if (document.frmEnquiry.OtherSurfaceArea.value == "") {
errorMsg == "";
}
Thank you,
Pimmy
|