Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: form.element is undefined
07-05-2013, 12:56 PM #1
- Join Date
- Aug 2009
- Thanked 0 Times in 0 Posts
form.element is undefined
This is probably a noobie question but I've been breaking my head over this one for several days.
For some reason I keep getting the following JS error:
TypeError: form.elements is undefined
var checkFields = form.elements['hikashop_product_characteristic['+options[i]+']'];
The page in question is:
Basically, when you change the color that error pops up. I can't possibly see what I'm doing wrong. Everything is defined, the name for the element also exists. I'm lost...
I would GREATLY appreciate any help
grabbing it with jquery like this works fine in the console but not in the script itself:
var checkFields = $("input[name=hikashop_product_characteristic\\[6\\]]");
Nevermind solved it! escaped the double backslashes with another slash. Seems to work now.
Last edited by Ortix; 07-05-2013 at 01:09 PM.