Get value from one window to another window - javascript
3 answers
You can also just use GET variables by calling site.com/index.php?info=value
and escaping the content value
. The url can be changed dynamically, for example:
<input type="text" id="the_value" />
<a href="#" onclick="return updateURL()" id="the_link">Click me</a>
<script type="text/javascript">
function updateURL()
{
document.getElementById('the_link').href =
'site.com/index2.php?info=' +
encodeURIComponent(document.getElementById('the_value'));
return true;
}
</script>
0
source to share