Forum Moderators: open
I have a page with a frame.
The document inside the frame is bigger then the Frame window.
when the user clicks on a link a faux pop-up (i.e an absolute positioned hidden div) is displayed.
The problem is that the div is always displayed at the top of the document (inside the frame), and the user might be 1/2 down the page when they click on the link and are not able to see it.
So I was asked to fix that. I thought it would be easy simply by invoking "self.scrollTo(0,0);" when the link is clicked.
but it doesnt work, I've tried every combinations I could think of to try and get it to work:
self.scrollTo
this.scrollTo
document.scrollTo
document.body.scrollTo
window.scrollTo
ect. . .
nothing seems to work, it always seems like the javascript is trying to scroll the parent window (and since that is not bigger then the browser window, doesnt scroll).
Anyone have a fresh idea of how I might get this to work?