Hi,
This is what I'm trying to achieve:
1. Use setHTMLContent() to set a "loading..." image.
2. Use setAjaxContent() to fetch the new content and replace the 
"loading..." image with it.

The problem is that while I use showCenter to display the window 
initially, the window is not centered after I update the window with the 
ajax result.
In addition, when I close the window, the overlay remains visible.

I think that what happens is that setAjaxContent calls addModalWindow 
and then something bad happens...
If I submit the ajax request myself and use setHTMLContent() with the 
response text, everything works fine except the fact that the window is 
not centered.

I don't see any function in the api which centers a window without 
showing it.

Here's an example code:

var url = "/example.php";
var win = new Window('title',
                     {
                        className: "dialog", title: "title", minWidth: 400,
                           showEffect: Effect.Appear, showEffectOptions: 
{duration: 0.3},
                           hideEffect: Element.hide, resizable: true, 
minimizable: false, maximizable: false,
                           wiredDrag: true, recenterAuto: false});

win.setHTMLContent('<div><img src="/loading.gif"></div>');
win.setDestroyOnClose();
win.showCenter(true);
 
win.setAjaxContent(url,
{
        method: 'get',
        parameters: 'param=example',
        onComplete: function(request) { win.updateWidth(); 
win.updateHeight(); }
}, true, true);


Thanks,
-Shahar

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to