I have a function i would like to run onChange. This works fine with an a-tag. But when i use it on an input-tag it just says:
form.saveFile is not a function
This works:
<a onclick="form.saveFile('fec056b774ffefa479c7dd3a632275cb','fec056b774ffefa479c7dd3a632275cb_filetest'); return false;" href="#">Upload file</a>
This does NOT work:
<input onchange="form.saveFile('fec056b774ffefa479c7dd3a632275cb','fec056b774ffefa479c7dd3a632275cb_filetest');" id="fec056b774ffefa479c7dd3a632275cb_filetest" class="file" type="file" name="fec056b774ffefa479c7dd3a632275cb_filetest" accesskey="F"/>
Both calls the same form.saveFile(); function.
The form variable is declared in a included js file like this:
form = {
version: '1.0.0',
...alot of functions...
saveFile : function(callback,p){
.................
}
}
formvariable come from? Where did you declare it?