I want the value of a variable named button_name to be set on a button event listener and send it in URL as REQUEST parameter. But what is happening the host variable is set on page load and does not take the value of updated variable. Any idea how to set the value of the variable dynamically and send it as REQUEST parameter?
var button_name;
$.Settings(
{
host : 'http://my_server_Address/abc.php?filename='+button_name,
})
function name_setter(name)
{
button_name=name;
}
<input type='button' onclick="name_setter('click_me')" value='click_me'/>
Please suggest if you think it can be done in some other way.
$.Settings?