Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > script to open page in new window

Reply
Thread Tools

script to open page in new window

 
 
jp2code
Guest
Posts: n/a
 
      09-13-2007
Using JavaScript, I can open a document in a new window like so:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<script type="text/javascript" language="JavaScript">
window.open("index.htm", "new",
"width=200,height=100,toolbar=no,resizable=no,menu bar=no,location=no,status=no,directories=no");
</script>
</head>
<body></body>
</html>

How would I do this using Classic ASP?


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-13-2007
jp2code wrote on 13 sep 2007 in microsoft.public.inetserver.asp.general:

> Using JavaScript, I can open a document in a new window like so:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head>
> <title></title>
> <script type="text/javascript" language="JavaScript">
> window.open("index.htm", "new",


use ,"_blank",

vut the settings of the browser prioritize

[off topic]

> "width=200,height=100,toolbar=no,resizable=no,menu bar=no,location=no,st
> atus=no,directories=no");
> </script>
> </head>
> <body></body>
> </html>
>
> How would I do this using Classic ASP?


You cannot, as ASP is serverside and has no notion
of windows, window tabs, etc.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
jp2code
Guest
Posts: n/a
 
      09-13-2007
Ok, then can I write some Classic ASP code to set browser values (size,
menubar, location, etc.) for the current page when it loads (which is all I
need)? If so, how?

"Evertjan." wrote:
>> How would I do this using Classic ASP?

>
> You cannot, as ASP is serverside and has no notion
> of windows, window tabs, etc.



 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      09-13-2007
"jp2code" wrote:
> Ok, then can I write some Classic ASP code to set browser values
> (size, menubar, location, etc.) for the current page when it loads
> (which is all I need)?


No.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      09-13-2007
"jp2code" <poojo.com/mail> wrote:

>Ok, then can I write some Classic ASP code to set browser values (size,
>menubar, location, etc.) for the current page when it loads (which is all I
>need)? If so, how?


Your ASP code will write out the javascript code that actually opens
the new window, right? You can write the parameters you want into the
javascript code at that time.

--
Tim Slattery
MS MVP(DTS)
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
jp2code
Guest
Posts: n/a
 
      09-13-2007
But JavaScript can not modify the window that it is in. Right?

So, basically, this can't be done.

Drats. That sure would have been slick if I could have gotten it to work.

"Tim Slattery" wrote:
>>Ok, then can I write some Classic ASP code to set browser values (size,
>>menubar, location, etc.) for the current page when it loads (which is all
>>I
>>need)? If so, how?

>
> Your ASP code will write out the javascript code that actually opens
> the new window, right? You can write the parameters you want into the
> javascript code at that time.
>
> --
> Tim Slattery
> MS MVP(DTS)
> (E-Mail Removed)
> http://members.cox.net/slatteryt



 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      09-13-2007
"jp2code" wrote:
> So, basically, this can't be done.
>
> Drats. That sure would have been slick if I could have gotten it to work.


So slick that you could have had your own exploit named after you.

Remember life before pop-up blockers? There's a reason you can no longer do
as much to the browser as you once could. Heck, IE once allowed you to open
windows off-screen. Imagine the fun pranks you could pull off with your
window out-of-sight. Whee!


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

 
Reply With Quote
 
jp2code
Guest
Posts: n/a
 
      09-13-2007
Yeah, I suppose so.

My app is for my personal use. I've got something here for testing on, and
it needs to occupy the full size of the touch screen, which is on my second
display.

Right now, to get it to work, I have to execute one page with some script
that calls the other to open. With the other page open, I can close the
first one and get back to work.

I guess I can understand not wanting to put that ability out there, though.

"Dave Anderson" wrote:
> So slick that you could have had your own exploit named after you.
>
> Remember life before pop-up blockers? There's a reason you can no longer
> do as much to the browser as you once could. Heck, IE once allowed you to
> open windows off-screen. Imagine the fun pranks you could pull off with
> your window out-of-sight. Whee!
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message.
> Use of this email address implies consent to these terms.



 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      09-14-2007
"jp2code" <poojo.com/mail> wrote in message
news:%(E-Mail Removed)...
> Yeah, I suppose so.
>
> My app is for my personal use. I've got something here for testing on, and
> it needs to occupy the full size of the touch screen, which is on my

second
> display.
>
> Right now, to get it to work, I have to execute one page with some script
> that calls the other to open. With the other page open, I can close the
> first one and get back to work.
>
> I guess I can understand not wanting to put that ability out there,

though.
>


Sounds like you need kiosk mode.

iexplorer.exe -k "<url>"


--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      09-14-2007
"jp2code" <poojo.com/mail> wrote:

>But JavaScript can not modify the window that it is in. Right?


Hmm... IE supports window.resizeBy(...) and window.resizeTo(...)
methods (http://msdn2.microsoft.com/en-us/library/ms535873.aspx# and
click "methods"). These are non-standard, so you can't depend on any
other browser to support them. I don't know whether Firefox does or
not.

--
Tim Slattery
MS MVP(DTS)
(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Window.Open get new tab instead of new window in FireFox Fredzidd@gmail.com Javascript 1 02-29-2008 03:06 AM
Open a new window on top of parent window using script Ralf ASP .Net 2 11-15-2006 09:45 PM
window.open() doesn't open new Window in Opera PC HUA Javascript 2 05-19-2004 02:29 AM
Need to open a new browser window, not a new window Gordon ASP General 3 04-16-2004 10:46 PM
How can I open a new window and ensure the page loaded creates a NEW session? Jazzis ASP General 4 09-26-2003 06:47 PM



Advertisments