How to pass value from the footer a popup form in the header

Hi guys,

I’ve a little problem need to solve.

I’ve a log in form in the header.php. It activates when the user click on a link within a page.
However, I want to pass a variable e.g. $this_item from the footer to that form. Here’s my code:


echo "<a href='#?this_item=" . $this_item . "' class='log_in_form'>Log In</a>";

How do get it work? (In this case the page does not reload)

Thanks

You could use a hidden form in the footer that simply contains a hidden input field with the value then use the form popup to see out the value using JavaScript.

<form action="" method="post" onsubmit="return false;">
    <input type="hidden" name="footer_value" id="footer_value" value="<?php echo $this_item; ?>" />
</form>
alert(document.getElementById('footer_value').value);

It’s not working, or maybe I just don’t know how to get it worked.