Hello,
I've written a function that checks -when the form is submitted- if they have selected a value that isn't the value "Select" ... the function works in IE but not in Netscape browsers .. what am I doing wrong ?
Here is the function:
function checksize()
{
if (document.product_detail.ProductSize.value=="Select"
{
alert("Please select a size ..."
document.product_detail.ProductSize.focus();
return false;
}
return true
}
This is the select and the form tag:
<form method="post" name="product_detail" action="shoppinglist.asp" onSubmit="return checksize()">
<select size='1' name='ProductSize'><option value='Select' selected>Select</option><option value='16_inches'>16 inches</option><option value='40_cm'>40 cm</option></select>
I've written a function that checks -when the form is submitted- if they have selected a value that isn't the value "Select" ... the function works in IE but not in Netscape browsers .. what am I doing wrong ?
Here is the function:
function checksize()
{
if (document.product_detail.ProductSize.value=="Select"
{
alert("Please select a size ..."
document.product_detail.ProductSize.focus();
return false;
}
return true
}
This is the select and the form tag:
<form method="post" name="product_detail" action="shoppinglist.asp" onSubmit="return checksize()">
<select size='1' name='ProductSize'><option value='Select' selected>Select</option><option value='16_inches'>16 inches</option><option value='40_cm'>40 cm</option></select>