Hello all,
I have a JS script, in this JS script I have 1 functions which creates an Object or an instance.
Is the object/instance created when the page loads or is it created when I call the function?
If the latter, how can I make it so that it creates the instance when I want it to?
Apologies for a nooby question.
Thanks all
Update
<input type='button' name='submit' onclick='videoUpload();' value='Upload' />
Here is the function:
function videoUpload(){
$.get("getUploader.php", function(data){
var viduploader = new AjaxUpload('#vidup', {
action: data,
name: 'userfile',
responseType: 'xml',
onSubmit: function() {
// allow only 1 upload
alert('onSubmit' + data);
this.disable();
},
onComplete: function(file, response){
alert('Response' + response);
}
});
});
}