bgreenhouse
Technical User
Hi Folks
I'm not sure if this is a JavaScript issue or an HTML issue, but I thought I'd ask here anyway...I am using the following code:
<a onMouseOut="swapImgRestore()" onMouseOver="swapimage('begin_button','','images/begin_button_over.gif',1)" onClick="validate()">
<img src="images/begin_button.gif" width="144" height="28" name="begin_button" border="0" align="middle" alt="Click Here to Begin"></a>
With the validate function:
function validate() {
if (document.login.card_num.value ==""
{
alert("Please input your card number."
return;
}
else if (document.login.pin_num.value ==""
{
alert("Please input your PIN number."
return;
}
document.login.submit();
location="intro.htm";
}
This works well in IE, but Netscape doesn't seem to like it (I can't even click on the image).
I'm just beginning with javascript, so excuse me if there is some really garbled coding...I know too that I could use <input type=image> instead of using the .submit, but I don't know if that would fix the problem, and I'd like to understand what's causing the problems here.
Thanks for anyhelp!
Ben
[sig][/sig]
I'm not sure if this is a JavaScript issue or an HTML issue, but I thought I'd ask here anyway...I am using the following code:
<a onMouseOut="swapImgRestore()" onMouseOver="swapimage('begin_button','','images/begin_button_over.gif',1)" onClick="validate()">
<img src="images/begin_button.gif" width="144" height="28" name="begin_button" border="0" align="middle" alt="Click Here to Begin"></a>
With the validate function:
function validate() {
if (document.login.card_num.value ==""
{
alert("Please input your card number."
return;
}
else if (document.login.pin_num.value ==""
{
alert("Please input your PIN number."
return;
}
document.login.submit();
location="intro.htm";
}
This works well in IE, but Netscape doesn't seem to like it (I can't even click on the image).
I'm just beginning with javascript, so excuse me if there is some really garbled coding...I know too that I could use <input type=image> instead of using the .submit, but I don't know if that would fix the problem, and I'd like to understand what's causing the problems here.
Thanks for anyhelp!
Ben
[sig][/sig]