Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prasad Welekar on Dec 11, 2008 06:30
open dhtmlx forum
DhtmlxWindows

Hello support,

Can a dhtmlxWindow loads dynamically?
I just went through all of the documentation. And I found that it just like a div which is loaded already.
When you want to show/view the window you just need to call the show() function. else hide().

Code:-
dhxWins.window("win").attachURL("../<%=Servlets.FORWARD%>?targetURL=jsps/copyTable.jsp&name="+document.getElementById('name').value);

Here param "name" will change on the users wish.
So basically when user click on the button to show window, Window should load dynamically.
Is it possible?

Thanks
Prasad Welekar.

Answer posted by Support on Dec 11, 2008 09:33
Hello,

Coul you please clarify your question?
Do you mean load itself dynamically or content via attachURL?
Answer posted by Prasad on Dec 12, 2008 02:15
Hello,
I mean the attachUrl jsp should get evaluated after clicking the button to show the window.
Actually I want to replace my old popup window by the dhtmlxWindow.
Old popup window evaluated dynamically, When I click on the button.
 Request is forwarded / send after the button click.
I want to do same with dhtmlxWindow.
Thanks.



Answer posted by Support on Dec 15, 2008 02:54
Hello,

You should do something like this:

<input type="button" ... onclick="openWin('http://www.your.url/...');">

<script>
    var dhxWins = new dhtmlXWindows();

    ...
    function openWin(url) {
       if (!dhxWins.window("w1")) {
          var w1 = dhxWins.window("w1");
          w1.attachEvent("onClose", function(win){win.hide();});         
       } else {
          var w1 = dhxWins.window("w1");
          w1.show();
       }
       w1.attachURL(url);
    }
}