MasterRenny Posted May 11, 2010 Share Posted May 11, 2010 Hide a content in a div tag or a table field when you tick a check box, and then for it to remember which ones where checked so when they return they can go right back to where they was? Link to comment https://forums.phpfreaks.com/topic/201404-is-it-possible-to/ Share on other sites More sharing options...
ignace Posted May 11, 2010 Share Posted May 11, 2010 Sure, just store it in a cookie through JS. Link to comment https://forums.phpfreaks.com/topic/201404-is-it-possible-to/#findComment-1056766 Share on other sites More sharing options...
MasterRenny Posted May 11, 2010 Author Share Posted May 11, 2010 Do you know how i could go about this? Link to comment https://forums.phpfreaks.com/topic/201404-is-it-possible-to/#findComment-1056808 Share on other sites More sharing options...
Cory94bailly Posted May 12, 2010 Share Posted May 12, 2010 Here's my script: http://cory.110mb.com/generator.php Put this in the 'head': <script type="text/javascript"> <!-- function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } //--> </script> Here's your checkbox: <input type="checkbox" name="mlgvariant" id="mlgvariant" onclick="toggle_visibility('custom_mapset');" /> Then I just made a 'span' with the name inside the toggle_visibility javascript function: <span name="custom_mapset" id="custom_mapset" style="display: block"> <label for="mapset">Custom Mapset:</label> <select name="mapset" style="width: 220"> -----SNIP----- </span> I'm sure you could easily tweak that to work for what you need. If you need any further explanation to my codes, go ahead and ask Link to comment https://forums.phpfreaks.com/topic/201404-is-it-possible-to/#findComment-1056864 Share on other sites More sharing options...
MasterRenny Posted May 12, 2010 Author Share Posted May 12, 2010 But it doesnt remember it was clicked? therefore if reloaded it appears again =] Link to comment https://forums.phpfreaks.com/topic/201404-is-it-possible-to/#findComment-1057060 Share on other sites More sharing options...
ignace Posted May 12, 2010 Share Posted May 12, 2010 But it doesnt remember it was clicked? therefore if reloaded it appears again =] He did mention: I'm sure you could easily tweak that to work for what you need. Link to comment https://forums.phpfreaks.com/topic/201404-is-it-possible-to/#findComment-1057133 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.