inserting javascript value into a url

wxdqz

New Member
When the html pages loads, I have a javascript function located in between the HEAD tags that retrieves a value from a cookie stored on the user's computer. I need to have that value inserted into a hyperlink url. Here is my current link code:

<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onClick="window.open('http://www.someurl.com','window','scrollbars=yes,toolbar=no,directo
ries=no,width=752,height=550')">

I need to have the javascript value somehow inserted in after the <!-- m --><a class="postlink" href="http://www.someurl.com">http://www.someurl.com</a><!-- m --> text (i.e. <!-- m --><a class="postlink" href="http://www.someurl.com?jsvalue=blah">http://www.someurl.com?jsvalue=blah</a><!-- m -->). I'm not sure how this can be done in javascript. I need to know how to print out JavaScript variable values by themselves in the body of an html document. I know how to insert the value into a hidden form input field:

<script>
document.write("<input type=hidden name=custom value=http://www.webdeveloper.com/forum/archive/index.php/"+affiliatecookie+">");
</script>

BUT, I need to get the value inserted into a url located in a hyperlink. Any ideas? Thanks in advance.
 
Back
Top