开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜