I have a javascript function some thing like this
function func(){
............
............
var v=window.showModelDialog(url);
............
}
In this function the execution of the function is blocked at modelDialog line and after the dialog is closed I use the returned value.
The problem is that I have to use a jquery plugin for model dialog.
I have tried some built-in plugin like facebox, fancybox or colorbox.
Using these plug-ins the execution is never stopped at there call and after the whole function is executed the pop-up is opened and the variable 'v' is always undefined.The execution is never stopped at
var v=$.fn.colorbox(href: 'url');
................
What I want is to block the execution until the pop-up is closed, have some one any idea or have knowledge of a similar built-in plugin of jquery?
I have tried already a solution that on the onClosed event of the colorbox call a function and copy past all the remaining code in that function and it works fine but I want another solution because I have to replace the showModelDialog from the whole application with a jquery plugin and it would be a tough time for me to create too much changes in the code and too much new functions. I want just one line code changes.