eyegraphix Posted October 19, 2005 Share Posted October 19, 2005 Link: http://www.kjly.com/optiontest.php I have a form and at the very bottom of it where it asks "Would you like to submit money now?" I have a radio button and when it is checked "yes" I'm using the dreamweaver behavior "show=hide layers" to reveal a hidden layer. All I want is for when the layer is shown, that the text and submit button move down when the layer is revealed. You can see now that it completely covers the button and text when the layer is revealed. I've tried a few things with no success. How can I accomplish this?? Quote Link to comment https://forums.phpfreaks.com/topic/2695-showhide-layers/ Share on other sites More sharing options...
eyegraphix Posted October 20, 2005 Author Share Posted October 20, 2005 I really need help with this. Someone? Please? Quote Link to comment https://forums.phpfreaks.com/topic/2695-showhide-layers/#findComment-8998 Share on other sites More sharing options...
ChrisDarl Posted October 21, 2005 Share Posted October 21, 2005 Basicly, use javascript in the <head> tags put <script type="text/javascript" language="javascript"> function showLayer() { var aLayer = document.getElementById("layerID"); aLayer.style.display = "block"; or use aLayer.style.visibility = "visible"; } function hideLayer () { var aLayer = document.getElementById("layerID"); aLayer.style.display = "none"; or use aLayer.style.visibility = "hidden"; } </script> on the radio buttons add onClick event to each, for the yes onClick put onClick="javascript:showLayer();" no : onClick="javascript:hideLayer();" You'll need to have all the content that you want hiding/shown in a div tag, with an ID. in the Javascript code change the 'layerID' to the ID of your div tag. if this doesnt work, let me know and ill actually run the code, might of slipped up somewhere. Hope it is of help. Chris Quote Link to comment https://forums.phpfreaks.com/topic/2695-showhide-layers/#findComment-9043 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.