Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Multiple checkboxes for accept terms form
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiple checkboxes for accept terms form

 Post Reply Post Reply
Author
Pixel View Drop Down
Newbie
Newbie
Avatar

Joined: 26 August 2003
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixel Quote  Post ReplyReply Direct Link To This Post Topic: Multiple checkboxes for accept terms form
    Posted: 08 October 2003 at 12:20pm

Greetings....

I have a script that will enable the my "Accept Terms" submit button when the checkbox is clicked on the registration_rules in WWF .... works fantastic... But I have several check buttons I'd like to force users to click on in order to enable the Accept terms button. With the following script any checkbox selected enables the accept button, how do I force the button to be enabled only when ALL checkboxes are checked?

Any help is wildly appreciated, thanks!

<script>
var checkobj

function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
var tempobj=checkobj.form.elements
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read/accept terms to submit form")
return false
}
}
}
</script>


<form method="post" name="frmregister" action="register.asp?FID=<% = intForumID %>" onClick="agreesubmit(this)">

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 3:01pm
So do a view source on this page for some script that does as you ask :-)
Contribute to the working anarchy we fondly call the Internet
Back to Top
Pixel View Drop Down
Newbie
Newbie
Avatar

Joined: 26 August 2003
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixel Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 3:21pm

That works great.... however....
How do I then process the original button value...

value="<% = strTxtAccept %><% = srtTxtAccept %>"

into that function to process the form?
<% = srtTxtAccept %><% = srtTxtAccept %>

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 3:29pm

you would remove the "onSubmit" event from the <form> tag and set the "action" parameter like you normally would...

the "Value" you show above has zero impact on any of the form action stuff, thats just the text that gets put into the button

Contribute to the working anarchy we fondly call the Internet
Back to Top
Pixel View Drop Down
Newbie
Newbie
Avatar

Joined: 26 August 2003
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixel Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 3:48pm
Oops...   Thanks!

Edited by Pixel
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.