peterallcdn
10-16-2008, 07:29 PM
Hello,
I do very little work with Javascript, but I'm sure this is an easy one...
I'm trying to jump to a dynamically-named anchor when the page loads but I'm just not sure of the correct syntax to use when passing the anchor name to the function.
This is what I have in the HEAD of the page: (Something is wrong with this is my guess)
<script type="text/javascript" language="javascript">
function moveWindow(AnchorName){window.location.hash='AnchorName';}
</script>
This is the call to the function with the dynamic anchor name, and is placed before the </body> tag.
<script type="text/javascript"><!--
moveWindow("comment");
//-->
</script>
How do I correctly pass(or correctly use the passed) the anchor name "comment" to the moveWindow() function?
Thanks for any and all help!
Peter
I do very little work with Javascript, but I'm sure this is an easy one...
I'm trying to jump to a dynamically-named anchor when the page loads but I'm just not sure of the correct syntax to use when passing the anchor name to the function.
This is what I have in the HEAD of the page: (Something is wrong with this is my guess)
<script type="text/javascript" language="javascript">
function moveWindow(AnchorName){window.location.hash='AnchorName';}
</script>
This is the call to the function with the dynamic anchor name, and is placed before the </body> tag.
<script type="text/javascript"><!--
moveWindow("comment");
//-->
</script>
How do I correctly pass(or correctly use the passed) the anchor name "comment" to the moveWindow() function?
Thanks for any and all help!
Peter