문제

I have flash with scrolling words. Each word is linked to http://www.foo.bar/somepage.html#parametar

So "word1" is linked to http://www.foo.bar/somepage.html#parameter1,

word2 is linked to http://www.foo.bar/somepage.html#parameter2, etc..

This works while I'm on every other page than "somepage.html".

When I'm on "somepage.html" it doesn't work. Parameter is just attached to url, but page is not loading again.

Here is my code:

on(release)
{
    getURL("http://www.foor.bar/somepage.html#parameter");
}

I have tried with setting _self, _top, _parent window and nothing.. It works only with _blank, but that is not what I want.

How to force page load without opening new window?

Thanks!

도움이 되었습니까?

해결책

The problem is that hash fragments (the text after the # symbol) do not cause a page refresh on their own, so if you are already on somepage.html, the browser won't refresh automatically.

The solution is to use some JavaScript on the page to detect the change to the hash fragment and trigger a page refresh. Ben Alman has written a jquery plugin that gives you cross browser support for detecting these changes.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top