开发者

How to open a JQ dialogue box on submit event?

I have a search field. I want to show the results in a dialogue box. The search field doesn't have any button. So, what event i should call to open the dialogue box after pressing enter.

Any suggestions!

Update

For the whole project, its all HTML, JavaScript & Jquery in client开发者_如何学JAVA side, Java is in back. What i want to know is, under which event i have to put the dialogue box generation codes and data manipulation codes.


Have a look at the jQuery Form Plugin. It allows you make a normal form into an AJAX form, posting back without reloading the page. You get a callback when the result is return, which you can then use to populate and show the dialog box.


You would probably want it in the callback for whatever ajax request you're using to get information from your server.

$.get("your-script.php", function(data){
    // display data here
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜