Javascript and PHP

Javascript and PHP
0.0 0

#1

$("#filedesc").blur(function() {
var y=’’;
var y= document.getElementById(“filedesc”).value;
window.y=y;

});


		$("#uploadresume1").uploadFile({
		 	
		url: "upload1.php?mytxt="+y,

The variables y doesnt hold a value in the above function. How to make it global?


#2

@phanichakri92 … did you try by declaring the var y = ""; out of the first function?
When you declare the variable out of the function, it means global variable. You can use the variable inside or outside of the function.
Remark:
Please close the second function with });