I am using jQuery modal dialog in my web application. I have used one button (cancel) and want to close dialog by clicking on it but it’s not working, while disable & destroy is working.
any idea please….
Code :
$("#dialog-form" ).dialog({
....
buttons: {
Cancel: function() {
$( this ).dialog( "close" ); // dialog doesn't close
// $( this ).dialog( "destroy" ); (it's working)
// $( this ).dialog( "disable" ); (it's working)
}
I realized now, it was my silly question but i hope it’d be helpful to someone. The problem i was getting due to missing of several files.e.g : There is a CSS file eithier we can use by linking directly or just download the file and put it in your web application and then link to your own server.
solution 1 :
solotion 2 : just download the css file and put it in your server. as i downloaded a css file called
jquery.ui.all.cssand put this inside of mywebApplication/lib. Now i can linkedbut here is a big deal, you need to check the file if it is importing some other files or not, as i went through this file and found that it is importing two other files.
This is what i was making mistake, again i downloaded these two files separately and put it in the same folder of my web app (my_web-App/lib/…..).
Problem due to jQuery file : make sure you always use the updated version of jQuery file. This is where i got stuck but finally i found that i am using the old version (
jQuery v1.3.2) of jQuery file while i was needed latest one (jQuery v1.6.2).