Pavan
Pavan

Reputation: 93

jQuery modal dialog is not working

I want to have a modal window opened and I've set modal to true in my code. But it does not work as expected:

   $("#fileuploadfun").attr('title',"Upload");
       $("#fileuploadfun").dialog( "option", "modal", true );

How can I solve this issue ?

Upvotes: 1

Views: 3237

Answers (2)

Matt
Matt

Reputation: 1811

I think you're trying to add a modal after the dialog is open, or vice versa. I ran into the same problem. It's addressed in this ticket: http://bugs.jqueryui.com/ticket/6803

This is expected behavior, doing the getter/setter will actually change the option modal if it gets launched again, not while it's open.

Upvotes: 0

Town
Town

Reputation: 14906

Try the .dialog initialiser syntax:

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

According to the documentation, the syntax you've used there is for setting the modality after the dialog has been initialised.

Upvotes: 1

Related Questions