View Full Version : Accept Terms script, doesnt work on Firefox...help please!

12-10-2004, 08:11 AM
Hi everyone,

I have used the script below for our website:

<SCRIPT language=JavaScript>

//Accept terms & conditions script (by InsightEye www.insighteye.com)
//Visit JavaScript Kit (http://javascriptkit.com) for this script & more.

function checkCheckBox(f){
if (f.agree.checked == false )
alert('Please check the box to continue.');
return false;
return true;

<form action="/test.html" method="GET" onsubmit="return checkCheckBox(this)">

I accept: <input type="checkbox" value="0" name="agree">
<input type="submit" value="Submit form">

It is based on this script: http://www.javascriptkit.com/script/script2/accept_term.shtml.

Both scripts work fine on IE but can't I get them to work on Firefox. On IE the script takes the user to designated page as long as the checkbox is ticked. But on Firexfox it does nothing!

Any ideas would be appreciated !



12-10-2004, 08:29 AM
I'm no javascript guru, but I tested the code you posted and it worked just fine (FF 1.0 on OS X). Perhaps you should post the rest of your code (in code tags) in case there is something else relevant to your problem...

12-10-2004, 08:42 AM
take out the red slash...<form action="/test.html" method="GET" onsubmit="return checkCheckBox(this)">
nevermind...i was thinking of something else...

12-10-2004, 09:10 AM

if (!f.agree.checked)

12-10-2004, 10:14 AM
Thanks guys!,

Brandoe85...removing the slash worked...i feel a bit stupid!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum