Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    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]+']'];
    For that line.

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts