Declaring variables with the keyword "var" outside of functions, makes a global var anyway;
But declaring it with 'var' keyword inside a body function makes it a local var.
therefore for internally initialized variables to be globally accessible you simply drop the variable constructor declaration.
This might also do just fine:
function selectThis(id){
locationstring = "process.php?value=" + id+
"&bs=" + $('#bs_' + id).attr("selectedIndex")+
"&ad=" + $('#ad_' + id).attr("selectedIndex")+
"&ns=" + $('#ns_' + id).attr("selectedIndex")+
"&wt=" + $('#wt_' + id).attr("selectedIndex")+
"&in=" + $('#in_' + id).attr("selectedIndex")+
}
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80