tags:

views:

7

answers:

0

I am trying to use an iframe to move around the site. My link inside the iframe would be

<a href="#" onclick="loadPage('test')">test</a>

//loadPage function

function loadPage(page){
    location.hash = page;
    $('iframe[name="iframe"]').attr('src','/'+page+'.php')
}

Now it works perfectly in IE7, pressing the back button or forward. My problem is with Firefox 3.6, clicking on the link will put "example.com#test" twice in the history, also pressing the back button has no effect at all. In firebug, it appears to only be loading once so I doubt it is an issue of loading the page twice (again IE figured it out).

I'm assuming I am doing something wrong, or just need to change something.

Thanks