Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open ASP page in new window

Status
Not open for further replies.

Beesknees

Programmer
Feb 27, 2001
95
GB
Does anyone know how to open an asp page so it opens up a new window in IE? I don't want it to target the frame. Thanks.
 
do the processing through a javascript function, this way you can open the window however you wish. it's a bit of a hack, but it's the only way that I can think of doing it.

if you pass params through the querystring,pass them into your jscript fxn, and just concat the results.

eg:

function myredirect(name, add) {
var url="somepage.asp?name=" + name + "&add=" + add;
location.href=url;
}

that should give you an idea...
hth
leo

------------
Leo Mendoza
lmendoza@students.depaul.edu
 
This is probably to simple a solution, however why don't you just use the target tag <a hre=&quot;mypage.asp&quot; target=&quot;none&quot;>

This will make the page open in it's own window.
 
excellent suggestions. thanks people. I need to open a window of a particluar size, just displaying a picture and some text. I guess javascript wopuld be best suited to this task?
 
here is the code i use

Code:
window.open(&quot;mywindow.htm&quot;,null, &quot;height=&quot;+screen.availHeight +&quot;,width=&quot;+screen.availWidth +&quot;,status=no,toolbar=no,menubar=no,location=no&quot;);
________
George, M
 
what about if I want to do trhis from a hyperlink, if i call the javascript from the href tag then it tries to find a page with the name of the function + parameters.
Bit of a newbie but what tag/function/event do I use for this. It MUST be a hyperlink. Any ideas?
 
<a href=&quot;javascript:&quot; onClick=&quot;functionName()&quot;>click here</a>

 
Put this just below you head statement

<SCRIPT Language=&quot;JavaScript&quot;>
<!-- // Begin hiding script from crummy old browsers...
var messageWindow;

function newWindow(messageID){
messageWindow = window.open(messageID, 'MessageWin', 'Width=450,height=340,location=yes')
messageWindow.focus()
}
// end hiding from the old crap ass browsers -->
</SCRIPT>

Put this in you html code....

<a href=&quot;javascript:newWindow('TheDay.asp')&quot;>Thanksgiving Holiday</a>

and just name &quot;TheDay.asp&quot; something else... and check it out..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top