开发者

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

开发者 https://www.devze.com 2022-12-23 21:13 出处:网络
Hii , I have a small php form. I need it to come ina pop up(dialog) whena user clicks a link .how do i d开发者_JS百科o this using jquery .Using the jquery UI Dialog

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

精彩评论

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