Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / February 2006

Tip: Looking for answers? Try searching our database.

Popup window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gomathi - 20 Feb 2006 06:07 GMT
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,'height =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
sloan - 21 Feb 2006 16:35 GMT
       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.

> Hi All,
>
[quoted text clipped - 11 lines]
> Regards,
> Gomathi

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.