Implementing an AJAX Pop Up Window
I would like to create an AJAX pop up window that will serve as a login pop up when the user clicks "log in" to log in to a website. What algorithm and programming will I need to do this?开发者_如何转开发 I will be using PHP and MySQL.
I doubt you need ajax, you can simply have a hidden div that fades in when you click login.
<div id="login-trigger">login</div>
<div id="login" style="display:none;">... login form goes here ...</div>
Using jQuery:
$('#login-trigger').click(function(){ $('#login').fadeIn() })
Example here: http://jsfiddle.net/pu4rd/
Take a look at the jQuery Tools Overlay.
There you can render out a (hidden) div containing the login box and show it as an overlay-popup (or even load an "external" login page like HERE).
精彩评论