I have a JavaScript function
function reload2(form)
{
var val=form.loc.options[form.loc.options.selectedIndex].value;
var val2 = form.category.options[form.category.options.selectedIndex].value;
self.location='upload.php?category=' + val2;
}
In the function the values of val 1 is storing the value of id 'loc' and val2 is storing the value of id = 'category'.
The self.location
is setting only category to value 2 but i also want the value of loc
to become val1
. ( so that on reloading, values of both loc
and category
are preserved).
What should i do in order to achieve that?