Hi All,
The below is code that is generated through PHP and copied from the browser. In it are two javascript functions that I can't get load/fire correctly...
1.Validate function to validate the form before submission
2.Popup function to act as a sort of tool tip where the use hovers over a link and a window pops up with the option desc.
<td width="25%"><center><b>Take It</b></td></tr><tr><td><font color=blue><a target="main" OnMouseOver="javascriptopup();
return=true" onMouseOut="javascript:aWindow.close()";>
Sterilizer</font></a></td><td align = center>$75.00</td>
<td align = center><input type = checkbox name = 2></td></tr></table><tr><td>Quantity</td><td>
<p align =left><input name = quant value = "" type = text size = 3 maxsize = 3>
</td></tr><tr><td>
<input type = submit value = "Add Item to Cart" OnClick="javascript:validate();">
<input type = reset value ="Clear"></form></td></tr></table></td></tr></table><br></body>
<script language="javascript">
<!--
function validate()
{
if document.form.quant.value > 0 {
alert("Please specify quantity of Estuary to purchase"
return false;
}
if document.form.bodyColour.value = "" {
alert("Please choose a Body Color for the Estuary"
return false;
}
if document.form.baseColour.value = "" {
alert("Please choose a Base Color for the Estuary"
return false;
}
}
function popup()
{ var aWindow;
aWindow = window.open("","","directories=no, scrollbars=no, resizable=no, status=no, left=450, top=350, toolbar=no, menu=no, width=125, height=100",
}
-->
</script>
</html>
can anyone figure out why this does not work...it is probably basic but I am lost..
TIA Bastien
There are many ways to skin this cat,
but it still tastes like chicken
The below is code that is generated through PHP and copied from the browser. In it are two javascript functions that I can't get load/fire correctly...
1.Validate function to validate the form before submission
2.Popup function to act as a sort of tool tip where the use hovers over a link and a window pops up with the option desc.
<td width="25%"><center><b>Take It</b></td></tr><tr><td><font color=blue><a target="main" OnMouseOver="javascriptopup();
return=true" onMouseOut="javascript:aWindow.close()";>
Sterilizer</font></a></td><td align = center>$75.00</td>
<td align = center><input type = checkbox name = 2></td></tr></table><tr><td>Quantity</td><td>
<p align =left><input name = quant value = "" type = text size = 3 maxsize = 3>
</td></tr><tr><td>
<input type = submit value = "Add Item to Cart" OnClick="javascript:validate();">
<input type = reset value ="Clear"></form></td></tr></table></td></tr></table><br></body>
<script language="javascript">
<!--
function validate()
{
if document.form.quant.value > 0 {
alert("Please specify quantity of Estuary to purchase"
return false;
}
if document.form.bodyColour.value = "" {
alert("Please choose a Body Color for the Estuary"
return false;
}
if document.form.baseColour.value = "" {
alert("Please choose a Base Color for the Estuary"
return false;
}
}
function popup()
{ var aWindow;
aWindow = window.open("","","directories=no, scrollbars=no, resizable=no, status=no, left=450, top=350, toolbar=no, menu=no, width=125, height=100",
}
-->
</script>
</html>
can anyone figure out why this does not work...it is probably basic but I am lost..
TIA Bastien
There are many ways to skin this cat,
but it still tastes like chicken