[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to change the opened window setting without using "window.open(...)"

Posted on 2004-10-09
3
Medium Priority
?
507 Views
Last Modified: 2008-03-10
Hi! I don't know whether to post this question on javascript or ASP topic area but I am getting that I will get an answer quicker by posting this on ASP topic.

I currently developing a logout.asp to logout user. What my client want is that after logout the screen will redirect to their home page. In addition they want unhide the window's address bar.

Because of that I am new to ASP, I only know javascript's "window.open("www.homepage.com", "_parents","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, top=0, left=0, width=" + screen.availWidth  + ", height=" + screen.availHeight);" to furfill this task.

On my login.asp I wrote:

window.open("login.asp?username=xyz","new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, top=0, left=0, width=" + screen.availWidth  + ", height=" + screen.availHeight)}

On my logout.asp I wrote:

self.close();
window.open("http:www.yahoo.com","_parents","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, top=0, left=0, width=" + screen.availWidth  + ", height=" + screen.availHeight);

A problem is that I am getting a prompt of "Close window?" for the user which I don't want. So I am thinking another way other than "window.open(...)" which can set the window's settings like menu bar, scrollbars, location and toolbar etc.

Can anyone give me the code (either javascript or vbscript) to solve this issue please?

0
Comment
Question by:limct
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 2000 total points
ID: 12266148
Two things:

1) there is very little that you can do other than to resize the window once it is opened
2) you can get rid of the prompt by doing this:

<A HREF='Close' onclick='self.opener=null;self.close();return false;'>Close Window</A>

That will allow you to use the window.open withoiut the distracting prompt.

FtB
0
 

Author Comment

by:limct
ID: 12268325
Hi fritz_the_blank,

Is there an alternative to "window.open(...)"? What I mean is rather close the window "self.close();", is that another way to redirect the page to another page while also change the setting of the window ie. location=yes, menubar=no, toolbar=yes and etc?

Thank you
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 12268787
The idea is that you do two things:

1) Spawn the popup via window.open so that you can specify all of the parameters
2) use code similar to the above to close the spawning window without the alert

As far as I know, and this question has been asked many a time, there is no other way to accomplish what you ask.

ftB
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question