Image element and Javascript

Status
Not open for further replies.
Ok it turns out that it was a javascript error that was not allowing me to change the image .. I ve found it but everytime I press a button element on a form a get this error Uncaught TypeError: Cannot read property 'name' of undefinedwhat is that?
 
ok the page is under development under Wamp Server.. I ve put it online through dynamic dns (no-ip) checked and it works. The url I provided to my-sites points directly to the form you are gonna see two buttons under a avatar image first one opens up a file loader and the second one does nothing if you press any of them you are going to see the error in the console thanks
 
Thanks I could see the bug, but as the js is loaded compressed I can't tell what line number is actually causing the issue. If you fill out a super admin account in http://fabrikar.com/you/my-sites/form/14/203 I can log in and tell fabrik to load up the uncompressed js files, which will then allow me to debug the code.
thx
Rob
 
I put the uncompressed javascript for fabrik and the error now is here
Fabrik.fireEvent('fabrik.form.submit.end', [this]);
if (this.result === false) {
this.result = true;
e.stop();
// Update global status error
this.updateMainError();
} else {
// Enables the list to clean up the form and custom events
if (this.options.ajax) {
e.stop();
Fabrik.fireEvent('fabrik.form.ajax.submit.end', [this]);
} else {
// Inject submit button name/value.
new Element('input', {type: 'hidden', name: btn.name, value: btn.value}).inject(this.form);
this.form.submit();
}
}
}.bind(this));
e.stop();
},

btn.name cannot be found (Uncaught TypeError: Cannot read property 'name' of undefined )
 
OK, I'm a little confused.

Those buttons seem to be trying to kick off an upload element, by doing:

Code:
registration___FUAvatarUploader.click();

Which just isn't going to work.

Can you be a little more explicit about what you are trying to do, and the relationship between your 'avatar' image element, and the file upload element?

As far as I can tell, you don't really need the image element at all, you could just be doing this with an upload element?

-- hugh
 
Forget about the code you saw in the page or the image element... maybe I should had made a new post so I dont confuse others.. even in an empty form with no javascript from me if I have an empty button element and press it I get this javascript error

and this code does work for me. It didnt work for you?
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top