Javascript unable to pass parameters into a property acting as a function
- by BOverflow
Currently in a simplified form, my code looks like this
function AddFileParam(file_id, name, value) {
uploadcontrol.addFileParam(file_id, name, value)
}
uploadcontrol = new Upload()
function upload() {
//logic
}
upload.prototype.AddFileParam = function(file_id, name, value) {
//logic
};
The code is giving me an error as it states that addFileParam is not a valid function. This is caused by the instance of the function upload (aka. uploadcontrol). This is only occuring in Firefox/Chrome and not in IE. Any ideas on how to fix this?