Try this:
- you're missing quotes when passing 'a', 's', and 'g' to your function
- your javascript function is not using == when comparing
I also made it so your cursor turns into a 'hand' when hovering over your div ;-)
<head> <title>Project Design Exhibit</title> <script type="text/javascript"> function showLogin(loginType) { alert(loginType); if (loginType == "a") { document.getElementById("loginProper").innerHTML = "Administrator Login"; } else if (loginType == "s") { document.getElementById("loginProper").innerHTML = "Student Login"; } else if (loginType == "g") { document.getElementById("loginProper").innerHTML = "Special Guest Login"; } } </script> </head> <body> <div style="margin:0 auto; width:1000px; border:1px solid black;"> <div style="width:1000px; height:50px; border:1px solid black;"> <div style="display:inline; border:1px solid black;cursor: pointer" onclick="showLogin('a')">Admin</div> <div style="display:inline; border:1px solid black;cursor: pointer" onclick="showLogin('s')">Student</div> <div style="display:inline; border:1px solid black;cursor: pointer" onclick="showLogin('g')">Special Guest</div> </div> <div id="loginProper" style="margin:0 auto; width:500px; height:700px;"></div> </div> </body> </html>