lazerbrains
10-10-2006, 06:54 PM
I have a page that has anchors in it and when you click on a link the page will scroll to an anchor. Everything works great in Firefox and IE, but Safari tends to only want to scroll up??!?!
See this example, this is the code I used to do this:
http://www.huntingground.freeserve.co.uk/main/mainfram.htm?../webplus/iframes/iframe_anchor_scroll.htm
I was wondering if anyone knows why or how to get Safari to correctly use an onClick event handler? Here is what I have and what is happening.
I have a link that is coded as follows:
<a href="#null" class="white" onClick="parent.scrollWin('anchor2')">Overview </a>
In Firefox and IE, the page scrolls down to 'anchor2'. In Safari it does nothing.
I also have code that you can click on to go back to the top:
<a href="#null" class="brown" onClick="parent.scrollWin('anchor1')">Back to top of page.</a>
Pretty much exactly the same, and again it works great in Firefox and IE, and oddly enough it does work in Safari as well.
I am not sure why, but it seems that the onClick will work if moving up the page, but not down?
Anyone have any info on this? Here is an example that I used to build this, let me know fi anyone can help.
Thanks :)
See this example, this is the code I used to do this:
http://www.huntingground.freeserve.co.uk/main/mainfram.htm?../webplus/iframes/iframe_anchor_scroll.htm
I was wondering if anyone knows why or how to get Safari to correctly use an onClick event handler? Here is what I have and what is happening.
I have a link that is coded as follows:
<a href="#null" class="white" onClick="parent.scrollWin('anchor2')">Overview </a>
In Firefox and IE, the page scrolls down to 'anchor2'. In Safari it does nothing.
I also have code that you can click on to go back to the top:
<a href="#null" class="brown" onClick="parent.scrollWin('anchor1')">Back to top of page.</a>
Pretty much exactly the same, and again it works great in Firefox and IE, and oddly enough it does work in Safari as well.
I am not sure why, but it seems that the onClick will work if moving up the page, but not down?
Anyone have any info on this? Here is an example that I used to build this, let me know fi anyone can help.
Thanks :)