I have JavaScript of ajax uploader as below;
$(document).ready(function(){
var qwerty = $('#qwerty').val();
$('#demo1').ajaxupload({
url:'upload.php',
remotePath: qwerty,
maxConnections:1,
finish:function(files)
{
alert('uploaded');
},
});
});
var qwerty
is the value of a text input having default value=""
. The field is blank when page loads. The text inside is set as the upload directory of the uploader. But it return null even if I enter some text inside. When I reload the page, the text I enter previously remain there and this time, the text is taken and passed into variable. Again if I change the text, the data passed is the text which remained in the input field and not the one I entered now. How can I always pass the current value of input field into the variable?