Sunday, May 19, 2024
78
rated 0 times [  84] [ 6]  / answers: 1 / hits: 16860  / 15 Years ago, mon, june 1, 2009, 12:00:00

We have a javascript function that should move a page to a certain position using anchors. This function just does window.location.href = # + hashName. This works in FF, but not in IE. I tested this code using IE7 under Windows XP.
I have tried using window.location.href, window.location.hash, window.location.replace and all these ways, but using document object.
Does anyone know how to deal with this issue?


More From » internet-explorer

 Answers
6

IE and most other browsers will scroll to an anchor with anchor.focus(), or to any element with an id with element.scrollIntoView(true)


[#99413] Thursday, May 28, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kenyonc

Total Points: 235
Total Questions: 106
Total Answers: 125

Location: Bangladesh
Member since Sat, Jan 23, 2021
3 Years ago
kenyonc questions
;