﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebDesktop - ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Tue, 04 May 2010 03:50:39 GMT</pubDate><dc:creator>julia</dc:creator><description>&lt;p&gt;Hi Hamdy,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you for the sample.&lt;/p&gt;
&lt;p&gt;Since you are going to close the window from an IFrame button, it is recommended to access the window parent first. Therefore, you could use the following code to modified the code in &lt;strong&gt;PageDialogBox&lt;/strong&gt; sample: &lt;/p&gt;&lt;pre&gt;function Button2_onclick() {            
            var wnd = window.parent.ISGetObject("WebDesktopManager1");
            var activeWnd = wnd.GetActiveWindow();            
            alert(activeWnd.Name &amp;#43; " is closed");
            activeWnd.Close();
        }&lt;/pre&gt;
&lt;p&gt;I hope this could helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Julia&lt;/p&gt;</description></item><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Tue, 04 May 2010 03:40:11 GMT</pubDate><dc:creator>hamdy.ghanem</dc:creator><description>&lt;p&gt;The issue :&lt;/p&gt;&lt;p&gt;that the windows cllection will remove the child window if the user close a dialog from this child window&lt;/p&gt;
&lt;p&gt;So Active window is null and also if  I tried to get the window by GetWindow function it will retrive  null as well&lt;/p&gt;
&lt;p&gt;Then I checked the windows.lenght if gound it zero&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;So&lt;/p&gt;
&lt;p&gt;I implement a workaroud as follow&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt; function Button1_onclick() {
            var dialogbox = ISGetObject("WebDialogBox1");
            var wnd = ISGetDesktopManager();
            if (lastwnd == null)
                lastwnd = wnd.GetActiveWindow();
            dialogbox.ShowDialog();
        }&lt;/pre&gt;
&lt;p&gt; assiging a bublic variable lastwnd before opening the dialog&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;and in closing&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;var lastwnd =null ;
 function Button2_onclick() {
            var wnd = ISGetDesktopManager();
    if (wnd.GetActiveWindow() !=null)
        wnd.GetActiveWindow().Close();
    if (lastwnd !=null)
        lastwnd.Close();
        }&lt;/pre&gt;
&lt;p&gt; I will close this public variable if the GetActiveWindow retrieve null&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;and It works correctly&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Tue, 04 May 2010 02:30:12 GMT</pubDate><dc:creator>hamdy.ghanem</dc:creator><description>&lt;p&gt;Dear Julia&lt;/p&gt;&lt;p&gt;Still the sample not my case&lt;/p&gt;
&lt;p&gt;my case , that the button which close the opened window in the window it self not in the parent&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; color: rgb(63, 63, 63); line-height: 17px; "&gt;I attached your sample after making my case&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; color: rgb(63, 63, 63); line-height: 17px; "&gt;and it has the error&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; color: rgb(63, 63, 63); line-height: 17px; "&gt;1- open the dialog box from the child window&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; color: rgb(63, 63, 63); line-height: 17px; "&gt;2- close the dialog&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 17px; "&gt;3- close the child window from the button on it (Close the form)&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 17px; "&gt;if i did not open the dilaog box the button will wiork and close the window &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 17px; "&gt;sorry the code by VB.net&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 17px; "&gt;and also he is the code PageDialogBox&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;span style="font-size: 12px; line-height: 17px; " /&gt;&lt;/font&gt;&lt;/p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; "&gt;&lt;pre&gt;&amp;lt;%@ Page Language="vb" AutoEventWireup="true" CodeFile="PageDialogBox.aspx.vb" Inherits="PageDialogBox" %&amp;gt;
&amp;lt;%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop"
    TagPrefix="ISWebDesktop" %&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head id="Head1" runat="server"&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;script language="javascript" type="text/javascript"&amp;gt;
// &amp;lt;!CDATA[
 function Button2_onclick() {
            var wnd = ISGetDesktopManager();
            var activeWnd = wnd.GetActiveWindow();
            alert(activeWnd.Name &amp;#43; " is closed");  //activeWnd would be 'Window 1'
            activeWnd.Close();
        }
        function Button1_onclick() {
            var dialogbox = ISGetObject("WebDialogBox1");
            dialogbox.ShowDialog();
        }
// ]]&amp;gt;
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;ISWebDesktop:WebDialogBox ID="WebDialogBox1" runat="server" Height="150px" Width="400px"&amp;gt;
            &amp;lt;WindowSettings&amp;gt;
                &amp;lt;WindowStyle&amp;gt;
                    &amp;lt;Normal BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                        Font-Names="Tahoma" Font-Size="8pt"&amp;gt;
                    &amp;lt;/Normal&amp;gt;
                    &amp;lt;Active BaseStyle="Normal" BorderColor="Gray"&amp;gt;
                    &amp;lt;/Active&amp;gt;
                &amp;lt;/WindowStyle&amp;gt;
                &amp;lt;CaptionStyle&amp;gt;
                    &amp;lt;Normal Cursor="Default" BackColor2="Gainsboro" BackColor="Gray" Font-Bold="True"
                        Font-Names="Tahoma" Font-Size="10pt" ForeColor="White"&amp;gt;
                        &amp;lt;Padding Top="2px" Left="2px" Right="2px" Bottom="2px"&amp;gt;&amp;lt;/Padding&amp;gt;
                    &amp;lt;/Normal&amp;gt;
                    &amp;lt;Active BackColor2="192, 192, 255" BaseStyle="Normal" BackColor="Navy"&amp;gt;
                    &amp;lt;/Active&amp;gt;
                &amp;lt;/CaptionStyle&amp;gt;
                &amp;lt;CaptionButtonStyle&amp;gt;
                    &amp;lt;Normal Overflow="Hidden" OverflowY="Hidden" OverflowX="Hidden" BorderColor="White"
                        BorderStyle="Solid" BorderWidth="1px" Height="17px"&amp;gt;
                    &amp;lt;/Normal&amp;gt;
                    &amp;lt;Over BaseStyle="Normal"&amp;gt;
                        &amp;lt;BorderSettings&amp;gt;
                            &amp;lt;Bottom Color="Gray"&amp;gt;&amp;lt;/Bottom&amp;gt;
                            &amp;lt;Right Color="Gray"&amp;gt;&amp;lt;/Right&amp;gt;
                        &amp;lt;/BorderSettings&amp;gt;
                    &amp;lt;/Over&amp;gt;
                    &amp;lt;Active BaseStyle="Normal"&amp;gt;
                        &amp;lt;BorderSettings&amp;gt;
                            &amp;lt;Left Color="Gray"&amp;gt;&amp;lt;/Left&amp;gt;
                            &amp;lt;Top Color="Gray"&amp;gt;&amp;lt;/Top&amp;gt;
                        &amp;lt;/BorderSettings&amp;gt;
                    &amp;lt;/Active&amp;gt;
                &amp;lt;/CaptionButtonStyle&amp;gt;
                &amp;lt;ContainerStyle BackColor="White" Font-Names="Tahoma" Font-Size="8pt" Height="100%"
                    Width="100%"&amp;gt;
                    &amp;lt;Padding Top="4px" Left="4px" Right="4px" Bottom="4px"&amp;gt;&amp;lt;/Padding&amp;gt;
                &amp;lt;/ContainerStyle&amp;gt;
                &amp;lt;CommandButtonStyle&amp;gt;
                    &amp;lt;Normal BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px"
                        Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False"&amp;gt;
                    &amp;lt;/Normal&amp;gt;
                    &amp;lt;Over BaseStyle="Normal" BackColor="#C5C2AF"&amp;gt;
                    &amp;lt;/Over&amp;gt;
                    &amp;lt;Active BaseStyle="Normal" BackColor="#8A887B" ForeColor="White"&amp;gt;
                    &amp;lt;/Active&amp;gt;
                &amp;lt;/CommandButtonStyle&amp;gt;
                &amp;lt;CommandButtonDisabledStyle BackgroundImage="" CustomRules="" BackColor="Control"
                    BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False"
                    Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False"
                    ForeColor="Gray"&amp;gt;
                &amp;lt;/CommandButtonDisabledStyle&amp;gt;
            &amp;lt;/WindowSettings&amp;gt;
        &amp;lt;/ISWebDesktop:WebDialogBox&amp;gt;
        &amp;lt;input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /&amp;gt;&amp;lt;/div&amp;gt;
         &amp;lt;input id="Button2" type="button" value="close this form" onclick="return Button2_onclick()" /&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;
&lt;p /&gt;</description></item><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Tue, 04 May 2010 00:32:47 GMT</pubDate><dc:creator>julia</dc:creator><description>&lt;p&gt;Hi Hamdy,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'm really apologize about my sample attachment before, because I haven't edit the comment. Here I reattach you the sample. This sample using exactly the same code as my statement before.&lt;/p&gt;
&lt;p&gt;I have follow your step in this sample and its working fine in my end. Could you please try this sample in your place and let me know if this sample work or not?&lt;/p&gt;
&lt;p&gt;Below is the following step:&lt;/p&gt;
&lt;p&gt;- click on button  open 'DialogBox'&lt;/p&gt;
&lt;p&gt;- close the dialog box ( click close (x) )&lt;/p&gt;
&lt;p&gt;- click on button 'close all' to close the window&lt;/p&gt;
&lt;p&gt;If this sample is not work, could you send me your sample project that replicating your issue?&lt;/p&gt;
&lt;p&gt;And for better result, please do not forget to use the latest bins before you run the project.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Julia&lt;/p&gt;</description></item><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Mon, 03 May 2010 05:08:05 GMT</pubDate><dc:creator>hamdy.ghanem</dc:creator><description>&lt;p&gt;Thanks for supporting&lt;/p&gt;&lt;p&gt;but it is still not wotking&lt;/p&gt;
&lt;p&gt;my case as follow&lt;/p&gt;
&lt;p&gt;1- open the dialog&lt;/p&gt;
&lt;p&gt;2 -close the dialog&lt;/p&gt;
&lt;p&gt;3- close the page&lt;/p&gt;
&lt;p&gt;var activeWnd = wnd.GetActiveWindow();&lt;/p&gt;
&lt;p&gt; activeWnd object is null&lt;/p&gt;
&lt;p&gt;that happened also with ur code by the way&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Mon, 03 May 2010 04:44:48 GMT</pubDate><dc:creator>julia</dc:creator><description>&lt;p&gt;Hi Hamdy,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'm apologize if I have misinterpret the scenario that you describe in the statement above. If I'm not wrong, are you trying to close the WebDesktop's window and WebMenuBar after open WebDialogBox?&lt;/p&gt;
&lt;p&gt;If yes, you could use these snippet :&lt;/p&gt;&lt;pre&gt;function Button1_onclick() {
            var wnd = ISGetDesktopManager("WebDesktopManager1");
            var mnuBar = ISGetObject("WebMenuBar1");
            var activeWnd = wnd.GetActiveWindow();
            mnuBar.Hide();
            activeWnd.Close();    
        }&lt;/pre&gt;
&lt;p&gt;Unfortunately, I'm sorry that I'm not use your code because the codes doesn't work in my end.&lt;/p&gt;
&lt;p&gt;Here I attach the sample for you. Please let me know if this sample has appropriate with your need or not.&lt;/p&gt;
&lt;p&gt;And if this sample is not fit with your scenario, please let me know the scenario with more details. Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Julia&lt;/p&gt;</description></item><item><title>ISGetCurrentWindow is retrieving null </title><link>http://www.intersoftsolutions.com/Community/WebDesktop/ISGetCurrentWindow-is-retrieving-null/</link><pubDate>Sun, 02 May 2010 11:04:38 GMT</pubDate><dc:creator>hamdy.ghanem</dc:creator><description>&lt;p&gt;I have a desktop wep&lt;/p&gt;
&lt;p&gt;I want to close an page&lt;/p&gt;
&lt;p&gt;so like the sample I am using this code&lt;span style="font-family: 'courier new', tahoma; font-size: 12px; white-space: pre; "&gt; var curWin = ISGetCurrentWindow();&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;                        ISGetObject("WebMenuBar1").HideAll(); // ensure all menus are closed before exit
                        curWin.Close(true); // close with raise event&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;but in one page I have a dialog box&lt;/p&gt;
&lt;p&gt;if I open this dialog and close it ISGetCurrentWindow function will retrive null and the closing code will not work&lt;/p&gt;
&lt;p&gt;I tried to use this fucntion ISCloseCurrentWindow();&lt;/p&gt;
&lt;p&gt;also not working&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;this happenes only if I open the dialog box and close it&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>