开发者

a simple php form in a dialog box or a pop up

Hii , I have a small php form. I need it to come in a pop up(dialog) when a user clicks a link .how do i d开发者_JS百科o this using jquery .


Using the jquery UI Dialog

$(function() {
   $('#myLink').click( function() {
        $('<div title="Warning: A dialog"><p>Dialog contents</p></div>').dialog({
                autoOpen: true,
                modal: true, // or false
                close: function() { $(this).dialog('destroy') } ),
                ... other options ...
        });
    });
});

If you need the dialog contents to be dynamic, you can use get() to load some html from the server and set the HTML of the dialog from it or just construct the contents dynamically from elements on the page, if that's more appropriate.


Hey, just look for jquery and dialog, this comes up: http://docs.jquery.com/UI/Dialog (I just assume you mean a HTML form as I don't know what you mean by 'php form'. php doesn't have forms)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜