I think what you want to do is win.getURL();

Here's the code I use to open a window ...

function displayWindow(url) {
   
    win_id = Application.getNewId();
   
   // sometimes the URLs get wrapped in quotes ... don't know why
   // when that happens pwc can't display the page.
   // this removes the quotes
   var len = url.length;
   if (url.indexOf('"') == 0) {
      url = url.substring(1, len-1);
   }
  
    if (win === undefined) {
      win = new Window(win_id, {className: "alphacube", title: url, top: 
findScrollTop() + 70, left:10, width: myWidth-40, height: myHeight-110, 
resizable: false, maximizable: false, minimizable: false, url: url});
    }
    else {
        win.destroy();
        win = new Window(win_id, {className: "alphacube", title: url, 
top: findScrollTop() + 70, left:10, width: myWidth-40, height: 
myHeight-110, resizable: false, maximizable: false, minimizable: false, 
url: url});
   }
   win.show();
}



Adam Alexander wrote:
> Hello. I'm new to PWC, and trying to figure something out, but while I 
> understand the existing API online documentation, I can't find usage 
> examples, and thus am running into issues. For instance, I've opened a 
> new modal window:
>  
> function openModal()
> {
>  var win = new Window('modal_window', {className: "modalWin", title: 
> "", url: "mywin.php", width:345, height:300})
>  
>  win.showCenter();
>  win.setDestroyOnClose();
>  win.show(true); 
> }
> mywin.php has two buttons, one for closing the modal window, one to 
> replace the the current modal's url with another url.
>  
> I was eventually able to figure out that the JS to close the modal 
> window is parent.Windows.closeAll(). This was not obvious from the 
> documentation, but I got it. (Is there a more appropriate way to do this?)
>  
> However, I cannot figure out the second task, replacing the current 
> url with another. I figure if I can successfully call getURL, then 
> setURL will work. From within mywin.php, I've tried alerting:
> getURL()
> parent.getURL()
> top.getURL()
> Window.getURL()
> parent.Window.getURL()
> top.Window.getURL()
> Windows.getURL()
> parent.Windows.getURL()
> top.Windows.getURL()
>  
> But none of those work. Help!
>  
> ~ Adam
> ------------------------------------------------------------------------
>
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
>   


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

Reply via email to