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?

my function-
Code:
<script type="text/javascript">
function headAnchor()
{
window.location.hash="head"; 
}
</script>
page anchor-
Code:
<a name="#head">
link-
Code:
<a href="http://my.dom/mylink.php" target="iframe" onclick="headAnchor()">

What am i missing?