Solved

how to open jquery dialog

Posted on 2011-09-30
4
368 Views
Last Modified: 2012-08-14
I open a jquery  dialog this way
$("#div_id").dialog('open'); <---this works

source: http://jqueryui.com/demos/dialog/

But I want a modal dialog so that background gets disabled.
similar to this..
http://jqueryui.com/demos/dialog/#modal

What changes I need to do in my code ?

0
Comment
Question by:cofactor
4 Comments
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36890480
show your code
0
 

Author Comment

by:cofactor
ID: 36890690
>>>show your code
Here is my code
$("#div_id").dialog('open');

what changes I need here so that  when the dialog opens background  be disabled ?
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36890866
use the modal option
http://docs.jquery.com/UI/Dialog#option-modal

$( "#div_id" ).dialog({ modal: true });
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 200 total points
ID: 36890870
Use the option modal:true

$("#div_id" ).dialog({ "modal": true });

test page : http://jqueryui.com/demos/dialog/modal-message.html
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses how to create an extensible mechanism for linked drop downs.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now