<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2127299.aspx</link><pubDate>Wed, 23 Jan 2008 12:18:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2127299</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2127299.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2127299</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;bp47580:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;how to retain the value during postbacks.&lt;/p&gt;
&lt;p&gt;ptherwise how can i do this?&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;There is no way.&amp;nbsp;You could only stop all PostBacks. You cannot place client-side window references into Session state. Give it up! &lt;strong&gt;Again -- there is no way to retain the window reference when a postback occurs! &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2126947.aspx</link><pubDate>Wed, 23 Jan 2008 09:29:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2126947</guid><dc:creator>kakali</dc:creator><author>kakali</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2126947.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2126947</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;window.open has a 4th optional parameter (replace: boolean) which you can use to check whether the same window is already open or not.&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;var&lt;/font&gt;&lt;font size="2"&gt; x = &lt;/font&gt;window.open(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;#39;test.aspx&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;#39;CustomPopUp&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;#39;width=800, height=600,statusbar=yes ,scrollbars=yes, menubar=no, resizable=yes&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;x.window.focus();&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size="2"&gt;So if user click the link n number of time, only a single window will open. &lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2126504.aspx</link><pubDate>Wed, 23 Jan 2008 05:24:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2126504</guid><dc:creator>virendra1983</dc:creator><author>virendra1983</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2126504.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2126504</wfw:commentRss><description>&lt;p&gt;This is how you create a session variable&lt;/p&gt;
&lt;p&gt;Session[&amp;quot;VariableName&amp;quot;] = assign any value to it..as for example&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Session[&amp;quot;VariableName&amp;quot;] = txtbox.text;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To access session variable again use this/&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;if(Session[&amp;quot;VariableName&amp;quot;] != null)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;textBox2.text = Session[&amp;quot;VariableName&amp;quot;];&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s always good to check for Session[&amp;quot;VariableName&amp;quot;] exists or not...&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2126492.aspx</link><pubDate>Wed, 23 Jan 2008 05:15:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2126492</guid><dc:creator>bp47580</dc:creator><author>bp47580</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2126492.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2126492</wfw:commentRss><description>&lt;p&gt;but how could i implement session in my code..&lt;br /&gt;plz give some code help..&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2126462.aspx</link><pubDate>Wed, 23 Jan 2008 05:03:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2126462</guid><dc:creator>virendra1983</dc:creator><author>virendra1983</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2126462.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2126462</wfw:commentRss><description>&lt;p&gt;To retain values you can use session variables.&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2126459.aspx</link><pubDate>Wed, 23 Jan 2008 05:01:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2126459</guid><dc:creator>bp47580</dc:creator><author>bp47580</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2126459.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2126459</wfw:commentRss><description>&lt;p&gt;how to retain the value during postbacks.&lt;/p&gt;
&lt;p&gt;ptherwise how can i do this?&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124648.aspx</link><pubDate>Tue, 22 Jan 2008 13:56:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124648</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124648.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124648</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;Add this to the aspx file&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/JavaScript&amp;quot;&amp;gt;&lt;br /&gt;var childWindow = null;&lt;/p&gt;
&lt;p&gt;function openWindow(windowUrl)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;if ( childWindow != null&amp;nbsp;&amp;amp;&amp;amp; childWindow.closed == false)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;childWindow.close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;childWindow = null;&lt;br /&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; childWindow = window.open(windowUrl, &amp;#39;CustomPopUp&amp;#39;, &amp;#39;width=800, height=600,statusbar=yes ,scrollbars=yes, menubar=no, resizable=yes&amp;#39;)&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change your script rendering in the CodeBehind file to:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Dim javaScript As String = &amp;quot;&amp;lt;script type=text/JavaScript&amp;gt;openWindow(&amp;#39;&amp;quot; + ConfigurationManager.AppSettings(&amp;quot;ActionTypeURL4&amp;quot;) + &amp;#39;&amp;quot;);&amp;lt;/script&amp;gt;&amp;quot;&lt;br /&gt;RegisterStartupScript(&amp;quot;OpenWindowScript&amp;quot;, javaScript)&lt;/p&gt;
&lt;p&gt;Note that RegisterStartupScript has changed since version 1.1 and you will get a compiler warning with the above. See &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.aspx&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Also note that if a PostBack occurs, you will lose your window refernce and this will not work.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124601.aspx</link><pubDate>Tue, 22 Jan 2008 13:37:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124601</guid><dc:creator>bp47580</dc:creator><author>bp47580</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124601.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124601</wfw:commentRss><description>&lt;p&gt;but its not working..&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124364.aspx</link><pubDate>Tue, 22 Jan 2008 11:48:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124364</guid><dc:creator>virendra1983</dc:creator><author>virendra1983</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124364.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124364</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Try this&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;gstrPopupScript = &amp;quot;&amp;lt;script language=&amp;#39;javascript&amp;#39;&amp;gt;&amp;quot; &amp;amp; &amp;quot;if(new_window==null || new_window.Closed)&amp;nbsp;{ new_window=window.open(&amp;#39;&amp;quot; &amp;amp; ConfigurationManager.AppSettings(&amp;quot;ActionTypeURL4&amp;quot;) &amp;amp; &amp;quot;&amp;#39;, &amp;#39;CustomPopUp&amp;#39;, &amp;quot; &amp;amp; &amp;quot;&amp;#39;width=800, height=600,statusbar=yes ,scrollbars=yes, menubar=no, resizable=yes&amp;#39;) } else {&amp;nbsp;new_window.window.focus(); &lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;}&amp;quot; &amp;amp; &amp;quot;&amp;lt;/script&amp;gt;&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientScript.IsStartupScriptRegistered(gstrPopupScript)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(gstrPopupScript)&lt;/p&gt;
&lt;p&gt;And put this javascript in your code&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;script&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;var new_window = null;&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124274.aspx</link><pubDate>Tue, 22 Jan 2008 10:52:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124274</guid><dc:creator>bp47580</dc:creator><author>bp47580</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124274.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124274</wfw:commentRss><description>&lt;p&gt;but the fact is that..&lt;br /&gt;if i use a variable in aspx.vb file...during opening a pop up...like&lt;br /&gt;&amp;nbsp;gstrPopupScript = &amp;quot;&amp;lt;script language=&amp;#39;javascript&amp;#39;&amp;gt;&amp;quot; &amp;amp; &amp;quot;new_window=window.open(&amp;#39;&amp;quot; &amp;amp; ConfigurationManager.AppSettings(&amp;quot;ActionTypeURL4&amp;quot;) &amp;amp; &amp;quot;&amp;#39;, &amp;#39;CustomPopUp&amp;#39;, &amp;quot; &amp;amp; &amp;quot;&amp;#39;width=800, height=600,statusbar=yes ,scrollbars=yes, menubar=no, resizable=yes&amp;#39;)&amp;quot; &amp;amp; &amp;quot;&amp;lt;/script&amp;gt;&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientScript.IsStartupScriptRegistered(gstrPopupScript)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(gstrPopupScript)&lt;/p&gt;
&lt;p&gt;can i access that variable(i.e: new_window) in script in aspx page source to close that form..&lt;br /&gt;then how....try to answer this according to my code...&lt;/p&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124259.aspx</link><pubDate>Tue, 22 Jan 2008 10:45:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124259</guid><dc:creator>virendra1983</dc:creator><author>virendra1983</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124259.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124259</wfw:commentRss><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;This is how I have checked..&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; childRef = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;function&lt;/font&gt;&lt;font size="2"&gt; UserAddress(page)&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;{ &lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (childRef == &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt; || childRef.closed)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;childRef = window.open(page , &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;#39;&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;#39;width = 550, height =500 ,top = 100, left = 260,status=1,resizable=0,scrollbars=1,addressbar=0,modal=1&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;else&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;childRef.window.focus();&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Mark as answered if it helped you..&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124227.aspx</link><pubDate>Tue, 22 Jan 2008 10:26:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124227</guid><dc:creator>harsha214</dc:creator><author>harsha214</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124227.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124227</wfw:commentRss><description>&lt;p&gt;&lt;u&gt;&amp;nbsp;http://forums.asp.net/t/1049405.aspx&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://forums.asp.net/emoticons/emotion-21.gif" alt="Yes" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>check whether any pop up window already opened from main page?????</title><link>http://forums.asp.net/thread/2124032.aspx</link><pubDate>Tue, 22 Jan 2008 08:33:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2124032</guid><dc:creator>bp47580</dc:creator><author>bp47580</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2124032.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2124032</wfw:commentRss><description>&lt;p&gt;i am using vs2005 and vb.net&lt;br /&gt;i am using this piece of code to pop up a window(i:e a aspx page) from a main page(also a aspx page)&lt;br /&gt;before opening that pop up window i want to check whether any pop up window from main page is already opened or not...&lt;br /&gt;if any pop up window is already opened then close this and open pop up window again&lt;br /&gt;how do i do this in vb.net....&lt;br /&gt;if i can use script then help me by providing some code...&lt;/p&gt;
&lt;p&gt;pop up window code..........&lt;br /&gt;gstrPopupScript = &amp;quot;&amp;lt;script language=&amp;#39;javascript&amp;#39;&amp;gt;&amp;quot; &amp;amp; &amp;quot;window.open(&amp;#39;&amp;quot; &amp;amp; ConfigurationManager.AppSettings(&amp;quot;ActionTypeURL4&amp;quot;) &amp;amp; &amp;quot;&amp;#39;, &amp;#39;CustomPopUp&amp;#39;, &amp;quot; &amp;amp; &amp;quot;&amp;#39;width=800, height=600,statusbar=yes ,scrollbars=yes, menubar=no, resizable=yes&amp;#39;)&amp;quot; &amp;amp; &amp;quot;&amp;lt;/script&amp;gt;&amp;quot;&lt;br /&gt;&amp;nbsp;ClientScript.IsStartupScriptRegistered(gstrPopupScript)&lt;br /&gt;&amp;nbsp;Response.Write(gstrPopupScript)&lt;/p&gt;</description></item></channel></rss>