-4

If i open the website http://www.tingbio.nl/ in browsers like Chrome, Firefox, Safari or IE9 i get no errors at all.

But, when i try to navigate the website in IE8, for example open up the page "assortiment" i get errors when opening any other page then the home. Anyone got a clue what this error means?

I personally think the error is created by the anchor that i use to get the page to open up below the menu.

I have no clue how to solve this problem.. and hope you guys can help me out!

Thx!

  • You should provide more information about the error and some code – il_guru Nov 05 '12 at 13:28
  • Perhaps you could provide details of the error? You are not going to get much help without it - don't assume that anyone is going to click on they link to find out for themselves... – CJM Nov 05 '12 at 13:30

1 Answers1

0

The problem is the href: assortiment.php#top is asking too much. IE8 can't deal with a link to an element that doesn't exist yet (the relative anchor is linking to an element on the new page).
JS can solve this problem for you, though:

window.onload = function()
{
    if (location.href.indexOf('#top') === -1)
    {
        location.href += '#top';
    }
}

Note that, in IE8, this code will result in a mem-leak check my answer there: an IIFE plugs the leak just fine, but requires a bit more code.

Community
  • 1
  • 1
Elias Van Ootegem
  • 74,482
  • 9
  • 111
  • 149
  • Your solution isn't doing exactly what i want to.. but it solves teh problem for now. I really got to dive more into JS. Thx Elias... ALOT! – PowerGuitarist Nov 05 '12 at 13:38