I'm doing a lot of bulk add links, because of this I get a lot of crappy links in the wrong category. I'm using the filter on "bulkedit links" to display all the crappy links or display all the links that should go into a particular category. For me, most of the time I use bulkedit links I want to check all the links that show up under the filter I used.
I wanted to add a check all/uncheck all javascript link. However the selection[linkid] array was more than my limited javascript skills could handle.
His license seems to allow me to use this code, and probably you, although your more knowledgable on reusing code in commercial software. Was thinking you may want to incorporate it into the default templates.
<script type="text/javascript"><!--
var formblock; var forminputs;
function prepare() { formblock= document.getElementById('form_id'); forminputs = formblock.getElementsByTagName('input'); }
function select_all(name, value) { for (i = 0; i < forminputs.length; i++) { // regex here to check name attribute var regex = new RegExp(name, "i"); if (regex.test(forminputs[i].getAttribute('name'))) { if (value == '1') { forminputs[i].checked = true; } else { forminputs[i].checked = false; } } } }
if (window.addEventListener) { window.addEventListener("load", prepare, false); } else if (window.attachEvent) { window.attachEvent("onload", prepare) } else if (document.getElementById) { window.onload = prepare; }
It says non-commercial and specifically prohibits selling, so of course I can't use it, but I should be able to add a different "check all" similar to what the validation page has.
Comments on Check All / Uncheck All
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
I'm doing a lot of bulk add links, because of this I get a lot of crappy links in the wrong category. I'm using the filter on "bulkedit links" to display all the crappy links or display all the links that should go into a particular category. For me, most of the time I use bulkedit links I want to check all the links that show up under the filter I used.
I wanted to add a check all/uncheck all javascript link. However the selection[linkid] array was more than my limited javascript skills could handle.
So I used code from this page
His license seems to allow me to use this code, and probably you, although your more knowledgable on reusing code in commercial software. Was thinking you may want to incorporate it into the default templates.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It says non-commercial and specifically prohibits selling, so of course I can't use it, but I should be able to add a different "check all" similar to what the validation page has.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Let me know if I missed anywhere on this.