473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Open Window, Please Help!

I know response.redirect doesn't open a new page. I have read many posts on
how to fix this but I can't get the first one to work. Please help.. I have
tried on 2 diff dev machines with no success (VS 2003) ASP.NET Web appl.
with Java Script setting in design properties.
I created a simple app with one button, under this button I have tried:
just to test the command Page.RegisterStartupScript I tried:

Page.RegisterStartupScript("TEST", "<script>alert(TEST MESSAGE');</script>")
pops up a 'message box'
WORKS GREAT!

BUT THE OPEN NEW WINDOW THING, I HAVE TRIED
Dim URL As String
URL = "a url string", tried several different public sites as well
as my own
Response.Write("<script language=JavaScript>window.open('" & URL &
"')</script>")
Exit Sub
DID NOTHING BUT FLASH, STAYED AT SAME PAGE..
TRIED:
Dim strURL As String
strURL = "http://www.microsoft.com/"
' Open your URL in a new window
Response.Write("<script>window.open('" & strURL & "',null,
'toolbar=no,menubar=no,scrollbars=yes,resizable=ye s,width=575px,height=400px
')</script>")
Exit Sub
SAME RESULTS

TRIED:
RegisterStartupScript("OpenWindowScript", "<script
language=""javascript"">window.open(""www.MSN.com" ");</script>")
SAME RESULTS

TRIED:
Page.RegisterStartupScript("openwin",
"<script>window.open('www.microsoft.com');</script>")
SAME RESULTS

HELP!
How can I get something to work? Thnaks greatly.. Buc..
Nov 18 '05 #1
1 1858
I usually just do a response.write("window.open('www.cnn.com', '_blank',
'height=400,width=585,titlebar=yes,top=25,left=25, scrollbars=yes,status=no,r
esizable=yes');")

Works great....just make sure your browser doesn't have a popup blocker
install....you'll run into problems if your unknown clients block popups
too.
"bucrepus" <bu******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I know response.redirect doesn't open a new page. I have read many posts on how to fix this but I can't get the first one to work. Please help.. I have tried on 2 diff dev machines with no success (VS 2003) ASP.NET Web appl.
with Java Script setting in design properties.
I created a simple app with one button, under this button I have tried:
just to test the command Page.RegisterStartupScript I tried:

Page.RegisterStartupScript("TEST", "<script>alert(TEST MESSAGE');</script>") pops up a 'message box'
WORKS GREAT!

BUT THE OPEN NEW WINDOW THING, I HAVE TRIED
Dim URL As String
URL = "a url string", tried several different public sites as well
as my own
Response.Write("<script language=JavaScript>window.open('" & URL &
"')</script>")
Exit Sub
DID NOTHING BUT FLASH, STAYED AT SAME PAGE..
TRIED:
Dim strURL As String
strURL = "http://www.microsoft.com/"
' Open your URL in a new window
Response.Write("<script>window.open('" & strURL & "',null,
'toolbar=no,menubar=no,scrollbars=yes,resizable=ye s,width=575px,height=400px ')</script>")
Exit Sub
SAME RESULTS

TRIED:
RegisterStartupScript("OpenWindowScript", "<script
language=""javascript"">window.open(""www.MSN.com" ");</script>")
SAME RESULTS

TRIED:
Page.RegisterStartupScript("openwin",
"<script>window.open('www.microsoft.com');</script>")
SAME RESULTS

HELP!
How can I get something to work? Thnaks greatly.. Buc..

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
1
by: bucrepus | last post by:
I know response.redirect doesn't open a new page. I have read many posts on how to fix this but I can't get the first one to work. Please help.. I have tried on 2 diff dev machines with no success...
3
by: Bechtle | last post by:
Hi googlers I'm creating a portal on MS Office Portal Server. Unfortunaterly there's no way to open a link of the navigation in a new window. Now I'm trying to create a homepage with a...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
13
by: Geoff Fox | last post by:
I am in the final moments of designing a new website. One of the pages (http://www.auditionfactory.com/samples.php) has four links to show sample work. I would like these links to open new...
11
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and...
1
by: Charl | last post by:
Hi All! I am using this external .js file for my websites navigation and would like to open the sites in a new window, will somebody please help me I have tried a few stuff but can't get it...
4
by: R Reyes | last post by:
Whenever I right-click on "Open in New Tab/Window" my website ALWAYS opens in the same window/tab. This is most likely a programming issue because when I visit other websites it works just fine. ...
6
by: akg | last post by:
Hi Friends, I am using window.open(myurl, other parameters....) method to open my url in a window. The problem is that myurl takes some time to open in the window, till that time this newly created...
0
by: hcuellar | last post by:
Hi. Please I need your help for this: After a database query, a table is created with a cell for each information retrieved, and for each record, two buttons, and second one have besides it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.