Firefox new page and jump to bookmark


I have been web designing using Internet Explorer for many years. Now due to the growing popularity of the Firefox browser I would like my sites to look and demonstrate the same behaviour on both.

Two things are causing me problems. Firstly when I use the target="_blank" tag in IE it opens in a new window (as desired) however in Firefox it opens in a new tab. This is not what I wish to happen. How can I make it open in a new window?

Also in IE on one of my pages as soon as it loads it jumps to a bookmark further down the page (as desired) however in Firefox the bookmark is ignored and it starts at the top of the page. How do I make it jump straight to the bookmark?

Any ideas folks?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>>Firefox it opens in a new tab
This is because the browser is configured to open "new windows" in a tab rather than a new browser instance. It's a user preference, which you cannot change programmatically. If anything you might want to try:
<a href="" onclick=",'blank','scrollbars=1')>Resources</a>
Look up the options (third argument) to

>>however in Firefox the bookmark is ignored and it starts at the top of the page
Last time I tested this, it worked perfectly fine. You just need to make sure that:
a. the "bookmark" exists
b. you added the "bookmark" to the end of the url. Ex:
3. you spelled the "bookmark" exactly as specified on the HTML code. #bookmark and #Bookmark are not treated the same

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coolarmaniAuthor Commented:
Thanks for the reply and for confirming my suspicions that it was not possible to overrule default firefox settings. (new page in new window/tab).

The second is basically as I was already doing but I have now managed to solve the issue.

I needed to add an additional:-
<script>window.location.href = "#bookmark";</script>

I already had one positioned just after the <BODY> tag but I needed to add another just before the </BODY> tag. If I only had the one after the <BODY> it would not work in Firefox and if I only had the one before the </BODY> tag it would not work in Internet Explorer. By including both it now works on both browsers.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.