HighTechTalks DotNet Forums  

Popup window

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss Popup window in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Gomathi
 
Posts: n/a

Default Popup window - 02-20-2006 , 01:07 AM






Hi All,

In my web application, i use this following code to open a pop up window.
Its working in my machine.

Response.Write("var win =
window.open('ResponseCountReport.aspx',null,'heigh t =300 width=420
scrollbars=yes');");

But when i hosted my application in my ISP server, its not working.
Any idea where the problem will be?

Thanks in advance.
Regards,
Gomathi



Reply With Quote
  #2  
Old   
sloan
 
Posts: n/a

Default Re: Popup window - 02-21-2006 , 11:35 AM






private readonly string JAVASCRIPT_STARTTAG= "<script
language='javascript'>";
private readonly string JAVASCRIPT_ENDTAG = "</script>";


public static void NewWindow ( Page p , string url)
{


string uuid = System.Guid.NewGuid().ToString();
//'uuid ensures uniqueness, the replace gets rid of non
html/javascript friendly values
uuid = uuid.Replace("-", "").Replace("{", "").Replace("}", "");
p.RegisterClientScriptBlock(uuid, JAVASCRIPT_STARTTAG + "var win
=
window.open('"+url+"',null,'height =300 width=420 scrollbars=yes');"+
JAVASCRIPT_ENDTAG)

}




You can try the Page..RegisterClientScriptBlock method instead. I don't
know if it will fix your issue or not, just giving a suggestion.


Above is a static method I have to pop a new window.. .from a code behind
method.

Another hint ... is the domain issue. Try passing in the FULL QUALIFIED url
... as it will be on the hosting server.

instead of
string url = "ResponseCountReport.aspx";

try

string url = "http://www.myhost.com/myapp/ResponseCountReport.aspx";

just as a test to see if thats the issue.

you might experiment with the ~ thing also.



"Gomathi" <gomathi (AT) celtycs-consulting (DOT) com> wrote

Quote:
Hi All,

In my web application, i use this following code to open a pop up window.
Its working in my machine.

Response.Write("var win =
window.open('ResponseCountReport.aspx',null,'heigh t =300 width=420
scrollbars=yes');");

But when i hosted my application in my ISP server, its not working.
Any idea where the problem will be?

Thanks in advance.
Regards,
Gomathi





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.