Refresh an index page so that the navigation disappears immediately?

citegirl
citegirl used Ask the Experts™
on
Is it possible to have the index page refresh (very quickly) so that the visitor does not notice, to remove the browser navigation? Does it work in all browsers?

Thanks much.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2013

Commented:
No.  You cannot modify the user's browser settings.  If you want use a defective presentation then you need to open a new window the the parts you don't want removed.  When I visit a site and the try to limit my options I just leave and don't bother to return, and you will find that is a common response.

Cd&

Commented:
yeah, just try and remove my navigation. i'll give you what for.

Author

Commented:
Yes, I understand. The purpose it to launch an internal learning module that does not require a browser.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Better yet: here is the complete scenario -- maybe you can think of something I can't.

1) User enters through conventional browser
2) User needs to login
3) After login, the new window is going to be an internal proprietary (corporate) browser, not a conventional Web browser.

4) The ultimate goal is to not end up with an orphaned Parent window.

Right now,

1) User enters with browser to a login screen
2) After logging in, a new window pops open without the navigation
3) Parent window is left hanging there

I am trying to find a creative way to end up with only one screen after login, no browser -- that's way I was thinking of a refresh. ANY IDEAS????
 
I have found two ways to make the main page appear as if it were full size (without menubars, location, etc.)  Try this:

-----------------------
<HTML><BODY>
Body info....
<A HREF="#" onClick="fullscreenpop()">Full screen 1 (using pop-up)</A><BR>
<A HREF="#" onClick="fullscreenresize()">Full screen 2 (using resize -- IE only)</A>
<SCRIPT>
function fullscreenresize(){
if(document.all){
window.resizeTo(screen.availWidth,screen.availHeight+25)
window.moveTo(0,0)
difference=screen.availHeight-document.body.clientHeight
window.resizeTo(screen.availWidth,screen.availHeight+25+difference)
window.moveTo(0,0-difference)
}
}

function fullscreenpop(){
if(!window.opener){
newWin=window.open(this.location,'newwindow','toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=no')
newWin.resizeTo(screen.availWidth,screen.availHeight)
newWin.moveTo(0,0)
*** Window.close hack removed by page editor ***
window.close();
}
}
</SCRIPT>
</BODY></HTML>
-----------------------

These are not perfect, but I think they are the only options.

Option 2 is IE only, and is probably not a good option.

I hope this helps!

Also, to add to the above comments about navigation, if you use this for bad causes (like an advertisement that closes the window that opened it), you will not have any business, and your viewers and sponsor pages will desert you.  But I think that this code does have many good uses, such as the one that you describe above.  However, even though your cause sounds reasonable, you may want to reconsider before screwing up the users navigation.  (Maybe have them click a link saying "Open in a new window".)

When you use this code, like all codes, you need to be considerate of the viewers.
The trick to closing the parent opener window is window.opener='a';window.close();

Author

Commented:
Will I end up with an alert? That's another thing we are trying to work around. I am trying to make this seamless if possible.

Author

Commented:
We are having trouble understanding how to implement the above idea...can you clarify? We only need a solution that works on IE -- we actually have a workaround for Netscape, but it's not our primary browser.

Thanks, again.

Commented:
in order to get rid of the alert: "the page is trying to close... blablabla" try this code in your popup window:

var pw = window.self;
pw.opener = window.self;
pw.close();

It worked very well on my machine... =0)
Top Expert 2013

Commented:
That closes the popup.  they are trying to close the main window.

Cd&

Author

Commented:
Is the consensus that this is an impossible task? It sounds minor, but this is an important issue to my client.

THANKS AGAIN.
You asked:
"Will I end up with an alert? That's another thing we are trying to work around. I am trying to make this seamless if possible."

You can close a main window with window.opener='a';window.close();
It will not alert you.

To impliment it, have a portal page that pops open the window that has the configurations the way you want it (no status bar or menu bar, etc.).  Then right after the code to open a new window, close the current window with "window.opener='a';window.close();"  It will close with no alert, leaving you with only one open window -- and it will have the browser settings the way you configure them.

I hope this is clear...  I tend to ramble on sometimes.
"Is the consensus that this is an impossible task?"

No!

Another alternative -- would it work with an HTA?  If it is for an Intranet, and HTA might be a good idea...  but I believe that "window.opener='a';window.close();" will solve your problems.

Author

Commented:
Thanks for the input; I am not sure if this is the right forum for this type of request (forgive me if not) but --

Are you interested in creating a version of this idea on an hourly contracted basis? If so, please let me know and I will send you my e-mail address.  Thanks again.
I don't remember seeing anything against job offerings in the TOS ;)

Sure, I'd be glad to help.

I looked at your profile...  I saw the question at
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20397828.html

You were given a misleading answer.  Rather than "window.opener.close();", use "window.opener.opener='a';window.opener.close();" and it will not alert you with the message.  I would have said it was impossible as well, until a few weeks ago when I found the code posted on Experts Exchange!

If you would like to e-mail me, I'll post my e-mail address.
Top Expert 2013

Commented:
Just so you know... from the user agreement list of thing not allowed:

"* soliciting individuals for employment other than in designated areas (for example, within a discussion thread)"

It is not uncommon for side benefits to occur in a thread and, no one will make an issue of it.  The only time it becomes an issue is when the question itself is a solicitation.

Experts who make themselves available for freelance normally include an email address in their profile, and indicate availability.  :^)

Cd&
 
Ah, thanks COBOLdinosaur!  Guess I better take a second look at the TOS, no?

Author

Commented:
Thanks, sorry for the lack of experience with this site. I had hunted around and saw the postings for job seekers, but not for employers. Where do I list such a contract job like this one?
Top Expert 2013

Commented:
The site is really not set up for that.  It is not labor exchange.  Most of us here are either running businesses or already have jobs.  There are sites devoted to jobs where you can post your requirements:

http://ows.doleta.gov/employ/hire.asp
http://molbiol.ru/eng/workdb/
http://www.nationjob.com/computers/
http://technology.monster.com/

You can also check the profiles of experts you think might be able t help you. When experts are available they sometimes put a link to their site or an email adress where they can be contacted for freelance work.

Cd&

Author

Commented:
Thanks very much for the input.

Commented:
If you were using ASP/VBscript, you could call the new browser/window from the logon screen that opens the internal browser, then use the opener.close function to close the first browser.

The only issue with this is that is may have unpredictable results with Netscape.
Top Expert 2007

Commented:
Hi..was looking to do something similar myself and was trying out the diff. methods mentioned here..
Alopederii's code works fine..doesnt give an alert when the main window closes..i.e. its seamless.
ivanmata's code works too..
var pw = window.self;
*** Window.close hack removed by page editor ***
pw.close();
but u have to put this in the main window, not the popup.
Top Expert 2013

Commented:
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I may recommend DELETE unless it is clear
   to me that it has value as a PAQ.  Silence = you don't care
</note>

Cd&

Author

Commented:
Eventually, we were able to work this issue out. Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial