script to open page in new window

script to open page in new window

am 13.09.2007 17:17:45 von jp2code

Using JavaScript, I can open a document in a new window like so:

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">








How would I do this using Classic ASP?

Re: script to open page in new window

am 13.09.2007 17:39:14 von exjxw.hannivoort

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:
>
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
>
>
>
>
>
>
>
> 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)

Re: script to open page in new window

am 13.09.2007 18:20:29 von jp2code

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.

Re: script to open page in new window

am 13.09.2007 18:52:01 von Dave Anderson

"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.

Re: script to open page in new window

am 13.09.2007 22:10:55 von Tim Slattery

"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)? 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)
Slattery_T@bls.gov
http://members.cox.net/slatteryt

Re: script to open page in new window

am 13.09.2007 22:25:03 von jp2code

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)
> Slattery_T@bls.gov
> http://members.cox.net/slatteryt

Re: script to open page in new window

am 13.09.2007 22:33:23 von Dave Anderson

"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.

Re: script to open page in new window

am 13.09.2007 22:50:03 von jp2code

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.

Re: script to open page in new window

am 14.09.2007 10:41:01 von Anthony Jones

"jp2code" wrote in message
news:%23nAopek9HHA.1184@TK2MSFTNGP04.phx.gbl...
> 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 ""


--
Anthony Jones - MVP ASP/ASP.NET

Re: script to open page in new window

am 14.09.2007 14:48:25 von Tim Slattery

"jp2code" 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)
Slattery_T@bls.gov
http://members.cox.net/slatteryt