Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: open browzer window


Message #1 by <odempsey@b...> on Wed, 22 Aug 2001 23:23:32 +0100
Hi there

what's the best way to open a new browser window with a hyperlink from a 

dynamic page



for example my page is

www.mysite.com/mypage.asp?ID=3D34



and I want to open a new page called



www.othersite.com



in a new browser window



Regards

Oliver Dempsey



Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 23 Aug 2001 10:10:53 +0100
<a href="http://www.othersite.com" target="_blank">



-----Original Message-----

From: odempsey@b... [mailto:odempsey@b...]

Sent: 22 August 2001 23:24

To: ASP Web HowTo

Subject: [asp_web_howto] open browzer window





Hi there

what's the best way to open a new browser window with a hyperlink from a

dynamic page



for example my page is 

www.mysite.com/mypage.asp?ID=34



and I want to open a new page called 



www.othersite.com



in a new browser window



Regards

Oliver Dempsey





Message #3 by "Drew, Ron" <RDrew@B...> on Thu, 23 Aug 2001 07:37:30 -0400
Not sure this is the best way...but it will work....just replace the name

and directory location and size it to your needs.



<SCRIPT LANGUAGE="javascript">

<!-- Begin

var newwindow = null;

function LinkForm(){

  newwindow = window.open('../data/gatekeeper.htm', 'SecurityCheck',

'width=350,height=200,resizable=1');

}

//--End -->

</script>



-----Original Message-----

From: odempsey@b... [mailto:odempsey@b...]

Sent: Wednesday, August 22, 2001 6:24 PM

To: ASP Web HowTo

Subject: [asp_web_howto] open browzer window





Hi there

what's the best way to open a new browser window with a hyperlink from a

dynamic page



for example my page is 

www.mysite.com/mypage.asp?ID=34



and I want to open a new page called 



www.othersite.com



in a new browser window



Regards

Oliver Dempsey

Message #4 by "Tim Morford" <tmorford@n...> on Thu, 23 Aug 2001 08:46:46 -0400
I think what you want is this.

But you are using this for the good not evil right?



<body onunload="window.open("http://www.othersite.com")">



Tim Morford



-----Original Message-----

From: odempsey@b... [mailto:odempsey@b...]

Sent: Wednesday, August 22, 2001 6:24 PM

To: ASP Web HowTo

Subject: [asp_web_howto] open browzer window





Hi there

what's the best way to open a new browser window with a hyperlink from a

dynamic page



for example my page is

www.mysite.com/mypage.asp?ID=34



and I want to open a new page called



www.othersite.com



in a new browser window



Regards

Oliver Dempsey

Message #5 by <odempsey@b...> on Thu, 23 Aug 2001 20:32:29 +0100
Ron,

The problem that I found with calling the javascript function in the onclick

event was when you use it in combination with the HREF that the current page

reloads also



Tim,

I only want the new page to open when the hyperlink is clicked



Alex,

 target="_blank seems to be what I'm looking for, but is there a way to set

the size of the new window using this method?



Regards

Oliver Dempsey





----- Original Message -----

From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Thursday, August 23, 2001 10:10 AM

Subject: [asp_web_howto] RE: open browzer window





> <a href="http://www.othersite.com" target="_blank">

>

> -----Original Message-----

> From: odempsey@b... [mailto:odempsey@b...]

> Sent: 22 August 2001 23:24

> To: ASP Web HowTo

> Subject: [asp_web_howto] open browzer window

>

>

> Hi there

> what's the best way to open a new browser window with a hyperlink from a

> dynamic page

>

> for example my page is

> www.mysite.com/mypage.asp?ID=34

>

> and I want to open a new page called

>

> www.othersite.com

>

> in a new browser window

>

> Regards

> Oliver Dempsey

>
Message #6 by "Tim Morford" <tmorford@n...> on Thu, 23 Aug 2001 19:51:17 -0400
Hello Sorry I must have misunderstood you here you go never the less

that should do it for you, I tested it and it does not reload the original

page, but pops a new page just fine.



<a

href="javascript:onclick=window.open('Http://www.othersite.com,width=660,hei

ght=570,scrollbars=auto,menubar=no,resizable=yes')"

target="_Blank"><P> </P>





Tim Morford

-----Original Message-----

From: odempsey@b... [mailto:odempsey@b...]

Sent: Thursday, August 23, 2001 3:32 PM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: open browzer window





Ron,

The problem that I found with calling the javascript function in the onclick

event was when you use it in combination with the HREF that the current page

reloads also



Tim,

I only want the new page to open when the hyperlink is clicked



Alex,

 target="_blank seems to be what I'm looking for, but is there a way to set

the size of the new window using this method?



Regards

Oliver Dempsey





----- Original Message -----

From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Thursday, August 23, 2001 10:10 AM

Subject: [asp_web_howto] RE: open browzer window





> <a href="http://www.othersite.com" target="_blank">

>

> -----Original Message-----

> From: odempsey@b... [mailto:odempsey@b...]

> Sent: 22 August 2001 23:24

> To: ASP Web HowTo

> Subject: [asp_web_howto] open browzer window

>

>

> Hi there

> what's the best way to open a new browser window with a hyperlink from a

> dynamic page

>

> for example my page is

> www.mysite.com/mypage.asp?ID=34

>

> and I want to open a new page called

>

> www.othersite.com

>

> in a new browser window

>

> Regards

> Oliver Dempsey

>
Message #7 by "sachin patil" <sa_patil@h...> on Fri, 24 Aug 2001 14:05:24 +0530
Dear Odempsey,



Here is the complete solution for your problem.

Please copy the below code .



*************code starts*********

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html;



charset=iso-8859-1">

<script language="JavaScript">

<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

//-->

</script>

</head>



<body bgcolor="#FFFFFF" text="#000000">

<a href="#"



onClick="MM_openBrWindow('sachin.htm','test','scrollbars=yes,resizable



yes,width=350,height=350')">Sachin</a>

</body>

</html>



****************code ends*********



Regards,



sachin





_________________________________________________________________

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



Message #8 by philip.moh@a... on Fri, 24 Aug 2001 17:06:35 +0800
Tim, you know how to open a new window and close the existing one without

prompting any confirmation message when the user click on the link??



> -----Original Message-----

> From:	Tim Morford [SMTP:tmorford@n...]

> Sent:	Friday, August 24, 2001 7:51 AM

> To:	ASP Web HowTo

> Subject:	[asp_web_howto] RE: open browzer window

> 

> Hello Sorry I must have misunderstood you here you go never the less

> that should do it for you, I tested it and it does not reload the original

> page, but pops a new page just fine.

> 

> <a

> href="javascript:onclick=window.open('Http://www.othersite.com,width=660,h

> ei

> ght=570,scrollbars=auto,menubar=no,resizable=yes')"

> target="_Blank"><P> </P>

> 

> 

> Tim Morford

> -----Original Message-----

> From: odempsey@b... [mailto:odempsey@b...]

> Sent: Thursday, August 23, 2001 3:32 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: open browzer window

> 

> 

> Ron,

> The problem that I found with calling the javascript function in the

> onclick

> event was when you use it in combination with the HREF that the current

> page

> reloads also

> 

> Tim,

> I only want the new page to open when the hyperlink is clicked

> 

> Alex,

>  target="_blank seems to be what I'm looking for, but is there a way to

> set

> the size of the new window using this method?

> 

> Regards

> Oliver Dempsey

> 

> 

> ----- Original Message -----

> From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Thursday, August 23, 2001 10:10 AM

> Subject: [asp_web_howto] RE: open browzer window

> 

> 

> > <a href="http://www.othersite.com" target="_blank">

> >

> > -----Original Message-----

> > From: odempsey@b... [mailto:odempsey@b...]

> > Sent: 22 August 2001 23:24

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] open browzer window

> >

> >

> > Hi there

> > what's the best way to open a new browser window with a hyperlink from a

> > dynamic page

> >

> > for example my page is

> > www.mysite.com/mypage.asp?ID=34

> >

> > and I want to open a new page called

> >

> > www.othersite.com

> >

> > in a new browser window

> >

> > Regards

> > Oliver Dempsey

Message #9 by "Tim Morford" <tmorford@n...> on Fri, 24 Aug 2001 09:13:24 -0400
I think the only way you can close a window with out a prompt is if you

create it like this, I could be wrong.



<a href="javascript: window.open('test.htm','','status=yes');

void('');"><P> </P></a>



to close the main windows use this

<a href="javascript:top.opener.close();"><P> </P></a>



But I think it will still alert you unless it is created like above



Tim



-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: Friday, August 24, 2001 5:07 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: open browzer window





Tim, you know how to open a new window and close the existing one without

prompting any confirmation message when the user click on the link??



> -----Original Message-----

> From:	Tim Morford [SMTP:tmorford@n...]

> Sent:	Friday, August 24, 2001 7:51 AM

> To:	ASP Web HowTo

> Subject:	[asp_web_howto] RE: open browzer window

>

> Hello Sorry I must have misunderstood you here you go never the less

> that should do it for you, I tested it and it does not reload the original

> page, but pops a new page just fine.

>

> <a

> href="javascript:onclick=window.open('Http://www.othersite.com,width=660,h

> ei

> ght=570,scrollbars=auto,menubar=no,resizable=yes')"

> target="_Blank"><P> </P>

>

>

> Tim Morford

> -----Original Message-----

> From: odempsey@b... [mailto:odempsey@b...]

> Sent: Thursday, August 23, 2001 3:32 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: open browzer window

>

>

> Ron,

> The problem that I found with calling the javascript function in the

> onclick

> event was when you use it in combination with the HREF that the current

> page

> reloads also

>

> Tim,

> I only want the new page to open when the hyperlink is clicked

>

> Alex,

>  target="_blank seems to be what I'm looking for, but is there a way to

> set

> the size of the new window using this method?

>

> Regards

> Oliver Dempsey

>

>

> ----- Original Message -----

> From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Thursday, August 23, 2001 10:10 AM

> Subject: [asp_web_howto] RE: open browzer window

>

>

> > <a href="http://www.othersite.com" target="_blank">

> >

> > -----Original Message-----

> > From: odempsey@b... [mailto:odempsey@b...]

> > Sent: 22 August 2001 23:24

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] open browzer window

> >

> >

> > Hi there

> > what's the best way to open a new browser window with a hyperlink from a

> > dynamic page

> >

> > for example my page is

> > www.mysite.com/mypage.asp?ID=34

> >

> > and I want to open a new page called

> >

> > www.othersite.com

> >

> > in a new browser window

> >

> > Regards

> > Oliver Dempsey

Message #10 by <odempsey@b...> on Fri, 24 Aug 2001 20:30:17 +0100
Thanks lads

both of them work fine



Regards

Oliver Dempsey






  Return to Index