Click to See Complete Forum and Search --> : Using javascript to open a link in the same window - no popup
Frost
03-11-2003, 03:24 PM
Ok, here's the deal.
I'm trying to open a link and turn off the status bar. But when I use javascript to do this, it opens a new window and does this. I want the link to open in the same window.
Also, maybe it would be easier if there were code to just put on every page that turns off such things as the status bar, toolbars, etc.
Any input is greatly appreciated.
joeys1
03-11-2003, 04:05 PM
If I understand you correctly, what you need is a plain-jane link,
<a href="nextpage.htm>Click here!</a>, but without any information being displayed in the statusbar. What you need to do, in that case, is:
<a href="nextpage.htm" onMouseOver="window.status='';return true;">Click here!</a>
That will not display any information.
If that doesn't quite answer your question, post your script up, and I'll see if I can't help some more.
Frost
03-11-2003, 04:08 PM
Thanks for the response but actually the reason I want the status bar gone is for space, not to hide information. Instead of making the user turn off the status bar themselves, I want to set it up in the code to automatically turn the status bar off so it physically isnt there.
I've found out how to do this with window.open() but it opens a new window. I want it to open in the same window.
Let's see. You can't take off scrollbars, status bar, menubar, etc., without opening a new window. You can, however, close the window without an alert and open a new window with your configurations specified.
Frost
03-11-2003, 04:16 PM
I hate code!
Anyone know another way around that?
You shouldn't be doing it at all. It is one thing for a popup, where users can close the popup and have their original window as they want it, and another thing entierly to try to do this to the parent window. If users want the status bar gone, they can click View->Status...It is best left alone...
Frost
03-11-2003, 04:21 PM
I have my reasons.
Originally posted by Frost
I have my reasons. I'm sure you do, but your visitors may not like your reasons. Barring opening a new window, it can't be done anyway...
Frost
03-11-2003, 04:26 PM
They would like it less if they have to change settings themselves to accomodate something on my site. They like it better if it was automatic and would accept it as part of the design.
But since it's not possible, then I guess its not that big of a deal.
Your pages should be designed so that you don't need to mess with the visitors browser. I honestly don't think that your users would be as apprciative as you think they would for you removing their status bar.
Frost
03-11-2003, 04:41 PM
Yeah you know my users better than I do I guess.
And, I'm guessing your users know how they like their browser set up better than you (or any other web developer) do.... :rolleyes: