conan318 Posted December 28, 2011 Share Posted December 28, 2011 is it possible to use the OnClick on an input type="text" Can anyone see why its not working? <script language="javascript"> function test(){ document.getElementById("1").style.display='block'; } </script> <div id="1" name="1" style="display: none; margin-left: 500px; margin-top: 660px; position: absolute; z-index: 9000;"> <p> TESTING</p> </div> <label for='Email'>Email</label><input type="text" name="email" onclick="test()"/> Link to comment https://forums.phpfreaks.com/topic/253984-show-hide-div-not-working/ Share on other sites More sharing options...
scootstah Posted December 29, 2011 Share Posted December 29, 2011 The code works for me. Link to comment https://forums.phpfreaks.com/topic/253984-show-hide-div-not-working/#findComment-1302036 Share on other sites More sharing options...
sunfighter Posted December 29, 2011 Share Posted December 29, 2011 Maybe your margin-top: 660px; places the word so low on the browser screen that you have to scroll down to see it? It does work and it does display very low. Link to comment https://forums.phpfreaks.com/topic/253984-show-hide-div-not-working/#findComment-1302352 Share on other sites More sharing options...
conan318 Posted January 22, 2012 Author Share Posted January 22, 2012 sorry for slow reply... i did get it working in the end Link to comment https://forums.phpfreaks.com/topic/253984-show-hide-div-not-working/#findComment-1309980 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.