Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

obelix

macrumors member
Original poster
Oct 20, 2004
99
0
Well they seem to work in both IE and FIREFOX but I just can't seem to get anchors to work in Safari. Apparently this is an issue to do with CSS and the overflow property. I found some information on it here:

http://blog.deconcept.com/code/overflowsafari/overflowsafari.html

However the fix doesn't seem to work for me. The page I am working on is here:

http://www.tumbara.com/demo/index2.php?action=about#c1

I've tried all sorts of things to try to get this to work but no such luck. I'm just at my wits end. Any ideas what could be happening here?
 

obelix

macrumors member
Original poster
Oct 20, 2004
99
0
Sorry it looks like I posted the wrong link...

http://blog.deconcept.com/code/overflowsafari/overflowsafari.html

What exactly is not working? Well the anchors aren't working. If you click the "Tumbara Project" or "Interview with Keith Baker" links you will find that they don't jump down the page like they should. If you open it in Camino or Firefox it works fine... same with IE... it just doesn't work in Firefox.

I'm just not sure how to implement what they are talking about in the blog into my code.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Right. It's nice and simple. If you look at the source code of the JavaScript fix in the linked example it includes a JavaScript file that defines scrollDivToAnchor. I don't see that on your page.

When I click on the first link (The Tumbara Project) I see the following in the JavaScript console (turn on the Safari Debug menu):

Object (result of expression scrollDivToAnchor) does not allow calls.
http://www.tumbara.com/demo/index2.php?action=about#c1
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
obelix said:
K I included the Javascript and still no luck... any ideas?
http://www.tumbara.com/demo/index2.php?action=about#c2

Sorry for the delay in replying, been having a nice sleep! Again it's very simple! Did you even read the JS Code? It defines a variable called targBox. In the file you are including it's set to "box". It has to be set to the id of the div that contains the anchors you want to scroll to.
 

obelix

macrumors member
Original poster
Oct 20, 2004
99
0
Sorry for wasting your time Robbie, I knew that needed to go in there but I guess I neglected to add it in with the last little update. I had taken everything out of the code you see because I wanted to try some other things and then when I made this post I forgot to add a few things back in. Sorry for all the trouble... you've been most helpful :) .... oh and it works now! Yay!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.