473,574 Members | 3,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect into window.open

I'm shelling out to an .asp (or htm) page from an application. I want
to show this in a window without the address bar, etc...

Is there a way I can redirect this page using javascript to a page
where I can set the window height, statusbar=no, etc?

Thanks,
-Luke
Jul 20 '05 #1
6 12149
In article <ll************ *************** *****@4ax.com>,
lu***@teleport. com shared the illuminating thought...
I'm shelling out to an .asp (or htm) page from an application. I want
to show this in a window without the address bar, etc...

Is there a way I can redirect this page using javascript to a page
where I can set the window height, statusbar=no, etc?

Thanks,
-Luke


It can be done from the client side and by opening a new window. You
can't do it from the server and you can't change the attributes of a
window that is already open.

What is doing the "shelling out"? If it's a web service, you don't have
control of the client. If you own the html page that is running on the
browser, you can open a new window and display whatever results you want
in it.
You didn't say if this was a form submission, an included file, or
whatever, so I can't give much more of an answer without knowing the
context.

----------------------------------------
~kaeli~
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Kill one man and you are a murderer.
Kill millions and you are a conqueror.
Kill everyone and you are God.
----------------------------------------
Jul 20 '05 #2
I am shelling out of an application (a simple VB application). The OS
will pick the browser (most likely IE).

All I can specify is a web page.

I have control of the server and the application.

If I shell out to a web page then it will be displayed just like any
web page. What I want to do is to display this web page with several
of the window.open properties either enabled or disabled. Therefore I
believe I need to execute a javascript command that will do this.

My tactic was to create a stub page that had some sort of javascript
which will display the page.

The issue is that I want to do a redirect so that the stub page goes
away (I don't want two browser windows open).

Can I specify window parameters with location.href? Can I specify
window parameters in a META REFRESH tag?

That's what I need help with.

-Luke

On Tue, 8 Jul 2003 12:26:49 -0500, kaeli
<in************ ********@NOSPAM att.net> wrote:
In article <ll************ *************** *****@4ax.com>,
lu***@teleport .com shared the illuminating thought...
I'm shelling out to an .asp (or htm) page from an application. I want
to show this in a window without the address bar, etc...

Is there a way I can redirect this page using javascript to a page
where I can set the window height, statusbar=no, etc?

Thanks,
-Luke


It can be done from the client side and by opening a new window. You
can't do it from the server and you can't change the attributes of a
window that is already open.

What is doing the "shelling out"? If it's a web service, you don't have
control of the client. If you own the html page that is running on the
browser, you can open a new window and display whatever results you want
in it.
You didn't say if this was a form submission, an included file, or
whatever, so I can't give much more of an answer without knowing the
context.

----------------------------------------
~kaeli~
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Kill one man and you are a murderer.
Kill millions and you are a conqueror.
Kill everyone and you are God.
----------------------------------------


Jul 20 '05 #3
In article <70************ *************** *****@4ax.com>,
lu***@teleport. com shared the illuminating thought...
I am shelling out of an application (a simple VB application). The OS
will pick the browser (most likely IE).

If it were a Windows application that was always IE, you'd have more
choices, but if it's internet where you don't know for sure, then you
have to allow for all browsers.
All I can specify is a web page.

I have control of the server and the application.

If I shell out to a web page then it will be displayed just like any
web page. What I want to do is to display this web page with several
of the window.open properties either enabled or disabled. Therefore I
believe I need to execute a javascript command that will do this.

My tactic was to create a stub page that had some sort of javascript
which will display the page.

The issue is that I want to do a redirect so that the stub page goes
away (I don't want two browser windows open).

Can I specify window parameters with location.href? Can I specify
window parameters in a META REFRESH tag?
No and no.
And a lot of people disable the awful meta refresh. I know I do.
People can also specify that new windows shouldn't be opened and that
you shouldn't take away functionality if they use Mozilla, which I also
do.

You have more options if this is an application that runs on a PC or if
this is intranet (instead of internet).

That's what I need help with.


You can't do this in a normal security environment nor in a cross-
browser fashion. Besides, anything you take away can be easily
reobtained by the user with the right-click menu.

Ideally, you shouldn't do it anyway. It defeats the purpose of
separating design from content, which is the way applications should be
done. Application data / content, HTML, and style - all should be a
separate tier. This was one of the reasons for XML and CSS.
But, many people are responsible for all three tiers, especially on
smaller sites, so the separation has a blurry line.

Theoretically, if your users had IE with a minimal security environment,
you could open a new window and close the current one, but users get a
warning when you do that normally.
If you were using Windows/IE exclusively, you could use WSH/HTA to
control things.

VB has a browser control. If this is an application run by the user on
their computer (.exe), using that would be a better alternative.

----------------------------------------
~kaeli~
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Kill one man and you are a murderer.
Kill millions and you are a conqueror.
Kill everyone and you are God.
----------------------------------------
Jul 20 '05 #4
Thanks to all.

First off. Let me just set part of this thread straight. This is an
Intranet and an exclusive IE shop. All we are doing with this page is
showing a preview of a page that will be uploaded to one or more web
sites.

Thus, the "previewed" page will be a standard ASP page. The redirect
page will be in-house and in-house only. Right now I have a call in
VB.NET using this function

System.Diagnost ics.Process.Sta rt(URL)

which will open the URL with the default browser which in our case
will always be IE.

Our apps create HTML based on several disparte sources of data. All I
wanted to accomplish was a preview of a page without the "external" UI
stuff.

Thanks,
-Luke

On Tue, 8 Jul 2003 18:49:04 +0100, "Richard Cornford"
<Ri*****@litote s.demon.co.uk> wrote:
"lukeo" <lu***@teleport .com> wrote in message
news:ll******* *************** **********@4ax. com...
I'm shelling out to an .asp (or htm) page from an application.
I want to show this in a window without the address bar, etc...

Is there a way I can redirect this page using javascript to
a page where I can set the window height, statusbar=no, etc?


Theoreticall y yes, in practice maybe no.

Passing the URL of the required page as the first argument to a call to
the window.open method and specifying the desired chrome in the third
("features" string) argument is the standard approach to achieving what
you want.

However, in an Internet context this has become a less reliable course
of action than it was a couple of years ago. First chrome control has
been severally restricted by some browser manufactures, Gecko (Mozilla,
Netscape 7, etc.,) browsers offer the user the option of vetoing most,
if not all, chrome specifications in the "features" string. In addition
content inserting/re-writing proxies facilitate this on browsers that do
not support it themselves. Proximitron, for example, in its default
configuratio n will always replace the "features" string with a (user
alterable) alternative that leaves the normal chrome in place. There are
also one or two browsers that will ignore the "features" string as a
matter of course (ICEBrowser for example).

That would leave the chrome of any new window that was opened
indeterminat e. And even if a window was opened without toolbars etc
simply pressing Ctrl+n (on IE) will open a new window with normal chrome
and showing the current page.

Then there is pop-up blocking with external programmes and browser
settings. Many combinations of realistic possibilities will result in a
call to the window.open function not opening a new window at all, or
sometimes navigation the current window to the URL provided for the
window open call (and the chrome of the current window will be
unaltered).

Tabbed browsers may also not co-operate with your intentions, opening th
e new widow as a new tab but not depriving the browser of the existing
user specified chrome.

And finally, small PDA browsers often cannot open new windows, do not
have a window.open function.

That leaves the desire to specify the chrome of a new window doomed to
failure under some circumstances (the user will have the chrome that
they want, if they care to arrange that) and quickly reversible even if
it is successful. While attempting to achieve the desired chrome by
opening a new window may just server to bar access to the page to a
number of potential visitors (including anyone who has JavaScript
disabled/unavailable).

It might just be best to review the reasoning behind the desire to
specify the chrome for a site.

Richard.


Jul 20 '05 #5
In article <8e************ *************** *****@4ax.com>,
lu***@teleport. com shared the illuminating thought...
Thanks,

Please see the other post. I think this thread has jumped the tracks.
All what we are trying to do is preview a page that will eventualy be
placed on a web site. The actual page is an ASP page which uses CSS
but not yet XSL, etc.

All I was concerned about was a proxy redirect page which will pop
this page in a window without the address bar and status bar, etc.

-Luke


The best way I can think of is instead of calling the external browser,
to call the custom browser component available in ASP.NET. I am not
overly familiar with .NET, but VB6 has an easy to use browser component
for things like this.
I can't think of any other way to do this (that would close the current
window with no alerts to the user). If the user has their security low
enough for the intranet, you can do self.close() to close the window. If
their security is on normal, though, they get an alert that says
something like "the application is trying to close the window.
Continue?"

Try having this in the page and see if users get alerts...

window.open("my Page.asp","","t oolbars=no");
self.close();

----------------------------------------
~kaeli~
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
----------------------------------------
Jul 20 '05 #6
Sounds like you should be using HTAs.

<HTML>
<HEAD>
<TITLE>My Monster Application</TITLE>
<HTA:APPLICATIO N ID="oMyApp"
APPLICATIONNAME ="monster"
BORDER="thin"
CAPTION="no"
ICON="/graphics/creature.ico"
SHOWINTASKBAR=" yes"
SINGLEINSTANCE= "yes"
SYSMENU="no"
WINDOWSTATE="no rmal">
</HEAD>
<BODY>
</BODY>
</HTML>

lukeo wrote:
Thanks to all.

First off. Let me just set part of this thread straight. This is an
Intranet and an exclusive IE shop. All we are doing with this page is
showing a preview of a page that will be uploaded to one or more web
sites.

Thus, the "previewed" page will be a standard ASP page. The redirect
page will be in-house and in-house only. Right now I have a call in
VB.NET using this function

System.Diagnost ics.Process.Sta rt(URL)

which will open the URL with the default browser which in our case
will always be IE.

Our apps create HTML based on several disparte sources of data. All I
wanted to accomplish was a preview of a page without the "external" UI
stuff.

Thanks,
-Luke

On Tue, 8 Jul 2003 18:49:04 +0100, "Richard Cornford"
<Ri*****@litote s.demon.co.uk> wrote:
"lukeo" <lu***@teleport .com> wrote in message
news:ll******* *************** **********@4ax. com...
I'm shelling out to an .asp (or htm) page from an application.
I want to show this in a window without the address bar, etc...

Is there a way I can redirect this page using javascript to
a page where I can set the window height, statusbar=no, etc?


Theoreticall y yes, in practice maybe no.

Passing the URL of the required page as the first argument to a call to
the window.open method and specifying the desired chrome in the third
("features" string) argument is the standard approach to achieving what
you want.

However, in an Internet context this has become a less reliable course
of action than it was a couple of years ago. First chrome control has
been severally restricted by some browser manufactures, Gecko (Mozilla,
Netscape 7, etc.,) browsers offer the user the option of vetoing most,
if not all, chrome specifications in the "features" string. In addition
content inserting/re-writing proxies facilitate this on browsers that do
not support it themselves. Proximitron, for example, in its default
configuratio n will always replace the "features" string with a (user
alterable) alternative that leaves the normal chrome in place. There are
also one or two browsers that will ignore the "features" string as a
matter of course (ICEBrowser for example).

That would leave the chrome of any new window that was opened
indeterminat e. And even if a window was opened without toolbars etc
simply pressing Ctrl+n (on IE) will open a new window with normal chrome
and showing the current page.

Then there is pop-up blocking with external programmes and browser
settings. Many combinations of realistic possibilities will result in a
call to the window.open function not opening a new window at all, or
sometimes navigation the current window to the URL provided for the
window open call (and the chrome of the current window will be
unaltered).

Tabbed browsers may also not co-operate with your intentions, opening th
e new widow as a new tab but not depriving the browser of the existing
user specified chrome.

And finally, small PDA browsers often cannot open new windows, do not
have a window.open function.

That leaves the desire to specify the chrome of a new window doomed to
failure under some circumstances (the user will have the chrome that
they want, if they care to arrange that) and quickly reversible even if
it is successful. While attempting to achieve the desired chrome by
opening a new window may just server to bar access to the page to a
number of potential visitors (including anyone who has JavaScript
disabled/unavailable).

It might just be best to review the reasoning behind the desire to
specify the chrome for a site.

Richard.


--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #7

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

Similar topics

3
6826
by: Steven | last post by:
All I want to pop up a window before/during redirect to another page. Sort of a confirmation page: <? .... /* I need to pop up a window here */
5
14190
by: Hugh Welford | last post by:
Hi, is it possible to open a page in a new window with response.redirect, and if so, what is the syntax Thanks Hugh
4
629
by: margaret | last post by:
James suggested that I used window.open on the client side to open a new window. I created a test ASP app and can get it work fine. But now I'm trying to fix my real app, which is in ASP.NET. It uses a button with the button handler in the C# code-behind page calling Response.Redirect. I can't find anything that's equivalent to...
3
12964
by: eieed | last post by:
I have a web page that is designed to allow users to run crystal reports which are then exported into PDF formats. Currently, when the user clicks the "Submit" button there is some processing to build the PDF file and then I use a Response.Redirect("Exported\\crystal_report_name.pdf)"; command to redirect the page. However, the user wants...
3
818
by: Sehboo | last post by:
On my ASP page, when I click a button, I want to do three things: 1. Check for some values. 2. Open a new window and pass some values as query string. 3. Redirect to some other page Here is the code: If (sServiceCenter = "*ALL") Then sServiceCenter = "%"
3
3565
by: ODB | last post by:
Okay what i need is to open af new browser windows with some link in, but i can't get the Response.Redirect to open af new window, and when i redirect to a new page in the same window and then hit back, i have some olde invalid data in my window. and i realy need to open af new browser ? Thanks ODB
8
3852
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing links to external sites. The hyperlink columns have the target="_blank" attribute so they preserve the existing window. This works OK except that...
9
11710
by: anuragsji | last post by:
Hi, I have one combo box and GO button on the click of GO button page submitted and according to selection of one of the option from combo I want to redirect my page to some new asp page but at the same time in new window of browser. I could have achieved this using window.open() of javascript but then it will serve as pop up and clients...
1
2559
by: rouellette | last post by:
Is it possible to redirect to another page in your application from the start page BEFORE the user has been authenticated if you're using FORMS authentication? I can't seem to get it to work. Simple example: In your start page simply try to redirect... private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) //...
0
7726
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7815
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8098
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6452
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5300
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3749
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1060
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.