Jump to content

Recommended Posts

It's not possible using PHP. You can use JavaScript for it though:

 

<a href="#" onclick="javascript:showForm();">Show Form</a>
<form id="someForm" style="display: none;" action="" method="post">
<label for="inputField">Label Name</label>
<input type="text" name="inputField" id="inputField" />
</form>
<script type="text/javascript">
function showForm() {
   var someForm = document.getElementById('someForm');
   if ("block" == someForm.style.display) {
      someForm.style.display = "none";
   } else {
      someForm.style.display = "block";
   }
}
</script>

Link to comment
https://forums.phpfreaks.com/topic/185710-hidden-login-form/#findComment-980616
Share on other sites

hmm this is the first time i've tried to mess w/ javascript, it seems a lot like php but i'm having some probs, my form still shows no matter what i do, but it's inside of a table...i dont know if that's a prob, but i took the test form you put in to test it and i can't get the link to work, what do i put in href? is the # sign okay for that?

Link to comment
https://forums.phpfreaks.com/topic/185710-hidden-login-form/#findComment-980637
Share on other sites

Take a look here..

 

www.torindul-designs.co.uk

 

My company website - cast your eyes to the Client Area button at the bottom right of the page, click it....

 

Is this something your after?

 

I can provide the code for such addon for you if you require something similar, this is called an inline frame - not detecting by pop-up blockers for that reason and can load content of an internal/external page, in your case your login document whether in another directory or not.

Link to comment
https://forums.phpfreaks.com/topic/185710-hidden-login-form/#findComment-980654
Share on other sites

The code isn't that hard to learn, infact its an adaptation of a few pre-built javascript codes.

 

The code wasn't made by me, http://jquery.com/demo/thickbox/ - there is the website address demonstrating how to install and use it correctly within your site, it takes seconds to implement. The content it shows is within another file.

 

 

Link to comment
https://forums.phpfreaks.com/topic/185710-hidden-login-form/#findComment-980667
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.