![]() |
|
Select/Unselect ALL Checkboxes - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141) +---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50) +---- Thread: Select/Unselect ALL Checkboxes (/showthread.php?tid=3705283) |
Select/Unselect ALL Checkboxes - ExaNet - Aug 20, 2013 I have tried probably over around 10 different Javascript and JQuery scripts for this and haven't been able to get one to work. This is my current script: Here's the JQuery import... Code <html>Here's the function... Code <script>And here's the HTML... Code <input type="checkbox" onclick="toggleChecked(this.checked)"> Select / Deselect AllIt makes all of the check boxes but when you click the select all, it doesn't do a thing to the other boxes. * - Dave85 - Aug 20, 2013 You forgot to close your function's brace. Why not just using something simple like this http://jsfiddle.net/xHCwJ/ * - ExaNet - Aug 20, 2013 (Aug 20, 2013 09:32 PM)Dave85 Wrote: You forgot to close your function's brace.The fiddle you posted didn't work either. :/ The code I added: Code <script language="javascript">* - Dave85 - Aug 20, 2013 I updated with a new fiddle:http://jsfiddle.net/xHCwJ/388/ Also use <script type="text/javascript"> not <script language="javascript"> And you call the script after page loaded. * - ExaNet - Aug 20, 2013 (Aug 20, 2013 11:12 PM)Dave85 Wrote: I updated with a new fiddle:http://jsfiddle.net/xHCwJ/388/It's still not working. :( Like I said, I've tried sooo many different scripts. I have no idea what's wrong. * - Dave85 - Aug 20, 2013 I guess you wait me to post code ? Code <!doctype html>* - ExaNet - Aug 20, 2013 (Aug 20, 2013 11:28 PM)Dave85 Wrote: I guess you wait me to post code ?I put exactly every thing you have there into file and it still isn't working. Do you think it's because it's a .php file? * - Dave85 - Aug 20, 2013 just save it as file.html and then open. * - ExaNet - Aug 20, 2013 (Aug 20, 2013 11:38 PM)Dave85 Wrote: just save it as file.html and then open.That's what I did. And I just said it fucks up all of my other stuff. In uBot, it does what I'm wanting it to do. Select users from a table based on attributes. And it was working in .php file type. So there should be a way to get it to work without renaming it to .html right? This is what it does when I rename it to .html.
* - Dave85 - Aug 21, 2013 Fit the previous script with yours, dont change anything. * - ExaNet - Aug 21, 2013 (Aug 21, 2013 12:29 AM)Dave85 Wrote: Fit the previous script with yours, dont change anything.I did! And I know I didn't mess it up cause when I changed the extension to .html the checkboxes worked fine! It just screwed up everything else. |