^eMpTy^ Posted February 14, 2005 Share Posted February 14, 2005 So I have xplode up and running and I really like the checkbox mode. I was wondering if it were possible to make it so different sets of check boxes were hideable...cuz after you get a bunch of stuff in there it starts to become unwieldy...I know how to do this with DHTML, but I don't really understand how html/javascript works with xplode...like, can I just go editing the html files that came with it and expect that to work?-eMpTy Link to comment Share on other sites More sharing options...
Wraith Posted February 14, 2005 Share Posted February 14, 2005 Try it and see.All the selection plugin is doing is embedding an IE window, so DHTML stuff should work fine.The ones included were only hacked together, so it's as basic as I could make them - I'm sure people could do a LOT more with it - I haven't done much with Javascript etc.If you can make something that's good, be sure to attach it here for other peoplet o use. Link to comment Share on other sites More sharing options...
^eMpTy^ Posted February 14, 2005 Author Share Posted February 14, 2005 I'm trying my little heart out to get it working right now...but for some reason it keeps telling me the object isn't there...I'm using the exact same code I've used in other projects...i have no idea why it wouldn't work... Link to comment Share on other sites More sharing options...
^eMpTy^ Posted February 14, 2005 Author Share Posted February 14, 2005 Ok I got it working...javascript is soooooo touchy...blah...I'll get it cleaned up and post it when I get the chance... Link to comment Share on other sites More sharing options...
^eMpTy^ Posted February 14, 2005 Author Share Posted February 14, 2005 ok here's how it's done...have to add one new function that will toggle the visibility:function toggleDiv(itemno) { var tags = window.external.GetTagCount(itemno); for(var j = 0; j < tags; j++) { var temp = "document.all.blah" + itemno + "blah" + j + ".style.display"; if (eval(temp)=="none") { eval(temp + "='block'"); } else { eval(temp + "='none'"); } }}Then need to modify another function or two:function addTag(text, itemno, tagno){ // retrieve this tag's attributes var disp = window.external.GetTagAttr("display", itemno, tagno); var checked = window.external.GetTagAttr("checked", itemno, tagno) == "true" ? "checked" : ""; // set up the current tag's layout stuff - name of checkbox ends up being item4.tag2 etc. // Changed by eMpTy to give each row containing a checkbox a unique id. text += "<tr class='effectrow' id=\"blah"+itemno+"blah"+tagno+"\" style=\"display: none\">"; text += "<td width='20' align='right'> </td>"; text += "<td width='20'> </td>"; text += "<td width='20' align='right' class='effectcheck'><input type='checkbox' name='item"+itemno+".tag"+tagno+"' "+checked+" id='"+disp+"'></td>"; text += "<td width='1000' class='effectitem'> "+disp+"</td>"; text += "</tr>"; // return the updated layout return text;}Changed one line in that function, and I changed this one line in the addItem function, but you could really do this anywhere. All you need is access to the item number.// Made the description of the item a link that toggles all the sub-items visibility. text += "<td width='1000' class='itemdesc'> <a href=\"javascript: toggleDiv('"+itemno+"')\">"+desc+"</a></td>"; Link to comment Share on other sites More sharing options...
Wraith Posted February 14, 2005 Share Posted February 14, 2005 Perhaps it's easier to attach the HTML....?Knowing other people's incapability with getting stuff working, perhaps it's not the best thing to get people to modify things they don't know much about. Link to comment Share on other sites More sharing options...
^eMpTy^ Posted February 14, 2005 Author Share Posted February 14, 2005 (edited) haha...well I figured if they're playing with this stuff in the first place...but yeah, I'll attach....... now attached select_checkboxes_collapse.html Edited February 14, 2005 by Wraith Link to comment Share on other sites More sharing options...
^eMpTy^ Posted February 18, 2005 Author Share Posted February 18, 2005 oh sweet you can attach files to posts...I thought I'd have to host it and it'd be a pain in the a**...sorry bout that... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now