Link to home
Start Free TrialLog in
Avatar of aumudin
aumudinFlag for United States of America

asked on

javascript scroll to anchor

Here is the issues im running into....

I have a page that loads a modal which loads a remote page that has a bunch of text in it.

I load the modal via jquery.

I need to have javascript or whatever scroll to a anchor on the page. right now im storing the anchor in a cookie. So lets say I have 3 anchors, they are named 1, 2, 3 in the cookie when someone clicks on link 2 it stores "2" into the cookie when the modal loads I need i to look a the cookie and scroll to that number.

One of the issues is it cannot reload the page so a window.location... will not work because that actually closes down the modal.

Any solutions that anyone can think of???

Thanks
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aumudin

ASKER

That did the trick I figured out what I did wrong when I tried that(first thing I tried) I didnt have the # just had the name of the anchor.... Thank you for helping me hernst!