Save User Inputs while javascript reloading!

Posted on 16th Feb 2014 by admin

hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown...Code: function reload(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
self.location='form.php?cat=' + val;
}

the problem with this script is that it can retain only the numbers which is the value of the selected item in the drop-down.I also want to retain the name field which is an input string. How can i do it?

Other forums