hide a specific div after login
hello noobie here.... can someone help me please regarding my problem... i want to hide a specific div.. that div is my login form then after i successfully logged in.. another will div will show.. that div is my control panel then after i logout i want to show again that login div and my i will hide again my control panel div...
1 Answer
first if you already using any framework such as jquery you can do that by hide() and show()
but if you want it with the normal javascipt: function showdiv(boxid){ document.getElementById(boxid).style.visibility="visible"; } function hidediv(boxid){ document.getElementById(boxid).style.visibility="hidden"; }One simple way to do this would be have to simple functions one to hide and one to show. and call them like: <a onclick="showdiv('id_to_show'); hidediv('id_to_hide');">switch</a> Posted: MacOS 1 of 1 people found this answer helpful. Did you? Yes No |
© Advanced Web Core. All rights reserved