Hi, Thanks in advance...
I want to test two form fields:
ConversionValue (text field)
convert (Select Dropdown: Index 0 = True - 1 = False)
Essentially, If ConversionValue is Blank, but convert is True
Then give an error and set convert to false...
Or if ConversionValue is blank and convert is false - skip it.
This is what i have... it all seems to work apart form the first
line with the && is not catching both fileds. IsBlank is a
function for testing the field is not blank and works.
if (IsBlank(document.prodForm.ConversionValue.value) &&
(document.prodForm.convert.selectedIndex.value = 0))
{
document.prodForm.convert.selectedIndex = 1;
alert("You must be enter a Currency Conversion Rate for
Convert to be Enabled!");
document.prodForm.ConversionValue.select();
document.prodForm.ConversionValue.focus();
return false;
}
Many Thanks
----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------