Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 09, 2012 08:40 PM by lak_2011
Member
316 Points
115 Posts
Apr 09, 2012 05:57 PM|LINK
how to open jquery dialog box on clicking a button inside a fancy box.?
can any one explain me with an example.
Thank you
Contributor
6399 Points
1184 Posts
Apr 09, 2012 07:24 PM|LINK
Here is an example for you. Please refer to the documentation at http://docs.jquery.com/UI/Dialog for additional information.
<html> <head> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.8.7.custom.min.js" type="text/javascript"></script> <link href="jquery-ui-1.8.7.custom.css" rel="stylesheet" type="text/css" /> <script> $(document).ready(function () { $("#btn").click(function () { $('<div id=\"divDialog\">Dialog contents...</div>') .dialog({ autoOpen: true, draggable: false, resizable: false, modal: true, width: 100, title: "Dialog title" }); }); }); </script> </head> <body> <input type="button" value="Open dialog" id="btn" /> </body> </html>
Apr 09, 2012 08:19 PM|LINK
Hi Thanks for your reply. i was able to open dialog box on clicking the button on facy box.
But the problem is dialog box shows up after clicking 2 times .
Thanks
Apr 09, 2012 08:40 PM|LINK
I noticed that for the first click it is opened under the fancy box
lak_2011
Member
316 Points
115 Posts
jquery dialog box
Apr 09, 2012 05:57 PM|LINK
how to open jquery dialog box on clicking a button inside a fancy box.?
can any one explain me with an example.
Thank you
mm10
Contributor
6399 Points
1184 Posts
Re: jquery dialog box
Apr 09, 2012 07:24 PM|LINK
Here is an example for you. Please refer to the documentation at http://docs.jquery.com/UI/Dialog for additional information.
<html> <head> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.8.7.custom.min.js" type="text/javascript"></script> <link href="jquery-ui-1.8.7.custom.css" rel="stylesheet" type="text/css" /> <script> $(document).ready(function () { $("#btn").click(function () { $('<div id=\"divDialog\">Dialog contents...</div>') .dialog({ autoOpen: true, draggable: false, resizable: false, modal: true, width: 100, title: "Dialog title" }); }); }); </script> </head> <body> <input type="button" value="Open dialog" id="btn" /> </body> </html>lak_2011
Member
316 Points
115 Posts
Re: jquery dialog box
Apr 09, 2012 08:19 PM|LINK
Hi Thanks for your reply. i was able to open dialog box on clicking the button on facy box.
But the problem is dialog box shows up after clicking 2 times .
Thanks
lak_2011
Member
316 Points
115 Posts
Re: jquery dialog box
Apr 09, 2012 08:40 PM|LINK
I noticed that for the first click it is opened under the fancy box