JS to open link + jump to page #anchor
I am doing an IDX portal (idx=real estate home search page).
I am using a few different platforms that communicate with iframes, its a little murky, but its stable.
When I click a link on my parent page, I want it to jump to a page anchor just above the iframe as it loads the href content. I'm not the best at JS, but here is my solution, and its not working. Help?
<a href="http://my.dom/mylink.php" target="iframe" onclick="headAnchor()">
What am i missing?
Oh, it works in IE (but only with compatibility view turned on). but not firefox or chrome. Whats the FF/C fix?
<a name="head"></a> w/o '#' ----> this is the point where the page will be scrolled to
<a href="#head">head</a> -----> this is clicked to scroll the page to the anchor described above
in XHTML or HTML5 use id attribute instead of name
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)