473,395 Members | 1,616 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,395 software developers and data experts.

How to open another .aspx as target="_blank"

ad
I used Response.Redirect(sUrl); to open another .aspx
But I want to open it in another browser like target="_blank"
How can I do that?

Nov 19 '05 #1
4 2003
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I used Response.Redirect(sUrl); to open another .aspx
But I want to open it in another browser like target="_blank"
How can I do that?


I'm not sure you can directly, because opening another window (i.e. another
instance of your browser) is a client-side function, not a server-side
function. However, I'm pretty sure you could do it with something like:

RegisterStartupScript("TargetBlank", "<script>window.open('" + sUrl +
"');</script>");
Nov 19 '05 #2
ad
Thanks,

I have antother question,
I open b.aspx in a.aspx, when the user close b.aspx by click the close
button,
how can we refresh the a.aspx?

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> ¼¶¼g©ó¶l¥ó·s»D
:#T**************@TK2MSFTNGP12.phx.gbl...
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I used Response.Redirect(sUrl); to open another .aspx
But I want to open it in another browser like target="_blank"
How can I do that?
I'm not sure you can directly, because opening another window (i.e.

another instance of your browser) is a client-side function, not a server-side
function. However, I'm pretty sure you could do it with something like:

RegisterStartupScript("TargetBlank", "<script>window.open('" + sUrl +
"');</script>");

Nov 19 '05 #3
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
I have antother question,
I open b.aspx in a.aspx, when the user close b.aspx by click the close
button,
how can we refresh the a.aspx?


Again, this has to be done client-side.

Simply create a while loop to wait until the window variable you populated
with window.open is null.

There are loads of examples of similar functionality here:

http://www.irt.org/script/window.htm
Nov 19 '05 #4
But using a while causes unnecessary cpu usage.
My advice u to add button to your opener page and modify style attribute as
"display:none". this will hide your button to user. And then from your popup
window before close code u should raise a click event for your hidden
button..

window.opener.document.all.my_hidden_button.click( )
window.close()

or something like...

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
I have antother question,
I open b.aspx in a.aspx, when the user close b.aspx by click the close
button,
how can we refresh the a.aspx?


Again, this has to be done client-side.

Simply create a while loop to wait until the window variable you populated
with window.open is null.

There are loads of examples of similar functionality here:

http://www.irt.org/script/window.htm

Nov 19 '05 #5

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

Similar topics

9
by: Sugapablo | last post by:
I admit, I'm terrible creating reg ex's. I'm trying to create a preg_replace that would remove from a <a href> tag that would replace the target attribute regardless of what the value might be....
12
by: Romain | last post by:
Hi, I've used an excellent way to make target="_blank" links that still validate while using HTML 4.01 Transitional doctypes in the past. I learned the trick from :...
1
by: Nick Messick | last post by:
I'm going through some old code and have found this a number of places. Seems kind of strange. Is there any reason why someone would do this?
16
by: St. Rechsteiner | last post by:
Hi How i made the same effect in xHTML like the - target="_blank" - Tag in HTML 4.01? I will use it with xHTML and CSS ... but the validator say's to me, that this tag wasn't valid for xHTML!...
6
by: Tony Marston | last post by:
The code <a href="..." target="_blank">...</a> will not validate as XHTML STRICT because of the 'target' tag, so how do I achieve the same result by moving it to a CSS file? I cannot find anything...
10
by: Dieter Salath? | last post by:
Hi, in our webpage, a user could open a windows explorer to his temp directory with a simple link and usage of the file protocol: <a href="file://C:\temp" target="_blank">C:\temp</a> This...
5
by: John A Grandy | last post by:
I have a js function that dynamically generates a block of html that includes an anchor tag : <a href="http://www.google.com" target="_blank" /> When the user clicks this link, the new IE6...
28
by: Jim Carlock | last post by:
For Strict DOCTYPEs, what's the recommended way to get an anchor to open inside a new browser? Thanks. Jim Carlock Post replies to the group.
6
by: fran7 | last post by:
Hi, I know that <base target="_blank"> will open all links in a new window. Anyone can suggest how to use it but selectively not open all the links. I have 10 links out of 100 that I dont want to...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.