Jump to content

[SOLVED] Displays both links at start!


daveoffy

Recommended Posts

I only want it to first show the Signup link. It shows both Signup and login link until I click one of them!

 

HTML/CSS

<div id="login"><?PHP include 'include/login.php'; ?>
<a href="#" onClick="showHide('login', 'register'); return false">Sign Up!</a>
</div>
<div id="register">Register Form HERE!!!
<a href="#" onClick="showHide('register', 'login'); return false">Log In!</a>
</div>

 

Javascript

<script type="text/javascript">
function showHide(hideid, showid) {
     var hideElement = document.getElementById(hideid);
     var showElement = document.getElementById(showid);
     hideElement.style.display = "none";
     showElement.style.display = "";
}
</script>

Link to comment
https://forums.phpfreaks.com/topic/139238-solved-displays-both-links-at-start/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.