/    Sign up×
Community /Pin to ProfileBookmark

Using javascript to open a link in the same window – no popup

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.

to post a comment
JavaScript

11 Comments(s)

Copy linkTweet thisAlerts:
@joeys1Mar 11.2003 — 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.
Copy linkTweet thisAlerts:
@FrostauthorMar 11.2003 — 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.
Copy linkTweet thisAlerts:
@JonaMar 11.2003 — 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.
Copy linkTweet thisAlerts:
@FrostauthorMar 11.2003 — I hate code!

Anyone know another way around that?
Copy linkTweet thisAlerts:
@pyroMar 11.2003 — 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...
Copy linkTweet thisAlerts:
@FrostauthorMar 11.2003 — I have my reasons.
Copy linkTweet thisAlerts:
@pyroMar 11.2003 — [i]Originally posted by Frost [/i]

[B]I have my reasons. [/B][/QUOTE]
I'm sure you do, but your visitors may not like your reasons. Barring opening a new window, it can't be done anyway...
Copy linkTweet thisAlerts:
@FrostauthorMar 11.2003 — 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.
Copy linkTweet thisAlerts:
@pyroMar 11.2003 — Your pages should be designed so that you don't [b]need[/b] 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.
Copy linkTweet thisAlerts:
@FrostauthorMar 11.2003 — Yeah you know my users better than I do I guess.
Copy linkTweet thisAlerts:
@pyroMar 11.2003 — And, I'm guessing your users know how they like their browser set up better than you (or any other web developer) do.... :rolleyes:
×

Success!

Help @Frost spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...