Hi guys, I have a php form (with javascript), at the moment I have hidden divs that appear when an earlier checkbox is ticked (checked). However, I'm now wanting to add some code earlier that will auto tick some of the checkboxes, I am still wanting the same hidden divs to appear but because the checkboxes aren't being physically clicked it's not working, does anyone know a good way to make the divs still appear if the checkboxes are selected?
Any help would be much appreciated.
thanks
my current code:
in head:
Code:<script type="text/javascript"> <!-- function showMe (it, box) { var vis = (box.checked) ? "block" : "none"; document.getElementById(it).style.display = vis; } //--> </script>
in body:
HTML Code:<input type="checkbox" name="UserFPArea1" value="FPA-South" onClick="showMe('SouthFP', this)" /> Example CheckboxHTML Code:<div id="SouthFP" style="display:none">example hidden div</div>


Reply With Quote

Bookmarks