ThePoor
01-23-2008, 02:38 PM
Hi All,
I need some help, the code below only works with IE,
It's a form validation, Please help so it's also work with Firefox. If some1 using firefox they can just click on the "Continue with Application" buttion and get the file.
Thank you,
var checkedBox = new Image();
blank = new Image();
checkedBox.src = 'Images\/termError.gif';
blank.src = 'Images\/termErrorBlank.gif';
function showImage(imagename, imageurl, errors) {
document[imagename].src = imageurl;
}
function validate()
{
if (!(document.form1.Checkbox.checked))
{
showImage("Box", "Images/termError.gif", true) // no semi-colon after this line!
event.returnValue=false;
}
else
{
showImage("Box", "Images/termErrorBlank.gif", false); // true = errors, false = no errors
event.returnValue=true;
}
}
<form name="form1" id="form1" method="get" action="SMSA Application.pdf" onClick="validate();">
<p>
<center>
</center>
<input type="checkbox" name="Checkbox" value="isChecked">
I have read and agree to <strong>SMSA</strong>'s terms.<br>
<img name="Box" src="Images/termErrorBlank.gif" width=245 height=15 border=0></p>
<p>
<input type="submit" name"submit" value="Continue with Application" onsubmit="return validate()" href="SMSA Application.pdf">
</p>
</form>
or http://www.sportandmedicalsciences.org/SMSA_Application.htm
I need some help, the code below only works with IE,
It's a form validation, Please help so it's also work with Firefox. If some1 using firefox they can just click on the "Continue with Application" buttion and get the file.
Thank you,
var checkedBox = new Image();
blank = new Image();
checkedBox.src = 'Images\/termError.gif';
blank.src = 'Images\/termErrorBlank.gif';
function showImage(imagename, imageurl, errors) {
document[imagename].src = imageurl;
}
function validate()
{
if (!(document.form1.Checkbox.checked))
{
showImage("Box", "Images/termError.gif", true) // no semi-colon after this line!
event.returnValue=false;
}
else
{
showImage("Box", "Images/termErrorBlank.gif", false); // true = errors, false = no errors
event.returnValue=true;
}
}
<form name="form1" id="form1" method="get" action="SMSA Application.pdf" onClick="validate();">
<p>
<center>
</center>
<input type="checkbox" name="Checkbox" value="isChecked">
I have read and agree to <strong>SMSA</strong>'s terms.<br>
<img name="Box" src="Images/termErrorBlank.gif" width=245 height=15 border=0></p>
<p>
<input type="submit" name"submit" value="Continue with Application" onsubmit="return validate()" href="SMSA Application.pdf">
</p>
</form>
or http://www.sportandmedicalsciences.org/SMSA_Application.htm