Hello,
Not sure if this JavaScript, but I am wondering how to let the login form and button disappear and have a text like: Welcome, you are now logged in shown instead.
I hope you understand me, it’s a LOT clearer inside my head ?
[CODE]<head> <script language="JavaScript" type="text/javascript"> function loginChange(){ document.getElementById(loginForm).visibility = "hidden"; } </script> </head> <body> <form id="loginForm" method="POST" action="#"> <input type="text" /><br /> <input type="password" /><br /> <input type="submit" onClick="loginChange()" /> [/CODE]
document.getElementById([COLOR="Blue"]"[/COLOR]loginForm[COLOR="Blue"]"[/COLOR]).[COLOR="Blue"]style.[/COLOR]visibility = "hidden"; // or document.getElementById("loginForm").style.display = "none";
<input type="submit" onclick="loginChange(); [COLOR="Blue"]return false;[/COLOR]" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script type="text/javascript"> //<![CDATA[ function loginChange(){ document.getElementById("loginForm").style.visibility = "hidden"; } //]]> </script> </head> <body> <h3>form start</h3> <form id="loginForm" method="post" action="#"> <div> <input type="text" /><br /> <input type="password" /><br /> <input type="submit" onclick="loginChange(); return false;" /> </div> </form> <h3>form end</h3> </body> </html>
Help @crabapples spread the word by sharing this article on Twitter...