Page 1 of 1
Select All Check Box
Posted: Mon Jan 18, 2010 5:20 pm
by michaelk46
Does anyone know of a way to implement a 'Select All' Checkbox in PHP and not Javascript?
Re: Select All Check Box
Posted: Mon Jan 18, 2010 5:43 pm
by SimpleManWeb
The only way that would be possible would be if your "Select All" was a link which refreshed the page. You could then hand in a "$_GET" variable that was something like index.php?SelectAll=1. Then, use that variable to set the selected value for all check boxes. This is definitely not the recommended way to handle something like this though, javascript is. Any reason why you don't want to use javascript?
Re: Select All Check Box
Posted: Mon Jan 18, 2010 6:42 pm
by michaelk46
I haven't learned it yet and was hoping I could find a work around until I do. Oh well, I'll just wait.
Thanks for the help
Re: Select All Check Box
Posted: Mon Jan 18, 2010 6:57 pm
by SimpleManWeb
I bet that if you do a google search for `Javascript check all checkboxes` you'll find some code that you could pretty much copy and paste.
Good luck
Re: Select All Check Box
Posted: Mon Jan 18, 2010 7:38 pm
by McInfo
A good place to start learning JavaScript is
Eloquent JavaScript.
Edit: This post was recovered from search engine cache.
Re: Select All Check Box
Posted: Tue Jan 19, 2010 5:24 pm
by michaelk46
Thanks for the suggestions... I'll definitely check them out