Solved

how to open jquery dialog

Posted on 2011-09-30
4
373 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
This article discusses how to implement server side field validation and display customized error messages to the client.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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)
Suggested Courses

739 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