Javascript and PHP

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


		url: "upload1.php?mytxt="+y,

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

@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.
Please close the second function with });