Uncaught TypeError: Cannot set property 'checked' of null

  • hoekbrwr
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 3

hoekbrwr created the topic: Uncaught TypeError: Cannot set property 'checked' of null

Has anyone a hint what goes wrong over here?
I stopped the code just before this point and I see every object and property until I try to change the value of that property. See my attachments!
#236866
Attachments:
  • Posts: 5930
  • Karma: 118
  • Thank you received: 550

MarioPuco replied the topic: Uncaught TypeError: Cannot set property 'checked' of null

Hi,

I think your code executes, before the document is fully ready, which is causing you to receive the NAME as null, since it is not rendered yet, this is why in jquery you always use $(document).ready();

Try to rewrite line 1853 as this is causing the issue like so getElementsByName("blabla").checked = true; and wrap it inside doc ready

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#236873
  • hoekbrwr
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 3

hoekbrwr replied the topic: Uncaught TypeError: Cannot set property 'checked' of null

I suppose you are right.
This event program is running because I fill a list with options from a callback reading an external spreadsheet. It is initiated in the form init program, but the somewhat later the callback runs. I used it for years and now suddenly it gives me this problem. It is definitely a timing/documentready thing. when I set a breakpoint in the debugger everything is at the expected value and present. I will have a look to integrate the document.ready at the right spot.
I will do some debugging messages in the console to see the time flow of init and this event program.
This is very interesting stuff.
Is there a way to block the interrupt for a program and set it when document is ready? So I can wait until the callback has run!
#236881
  • Posts: 5930
  • Karma: 118
  • Thank you received: 550

MarioPuco replied the topic: Uncaught TypeError: Cannot set property 'checked' of null

Hi,

Can you send the link to the form please ?

regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#236883
  • hoekbrwr
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 3

hoekbrwr replied the topic: Uncaught TypeError: Cannot set property 'checked' of null

I have ported the form to my own domain and tried if it works.
Look here: ndo-dev.leovanderhoek.nl/index.php/2014-...10-07-59/inschrijven
The problem still persists, although I can run more commands in wds_datum_action then before putting in jQuery(do...
#236887
  • Posts: 5930
  • Karma: 118
  • Thank you received: 550

MarioPuco replied the topic: Uncaught TypeError: Cannot set property 'checked' of null

Hi,

There is a line ff_getElementByName('bas_rumba').checked=false that is throwing this error.
Can you check if this bas_rumba actually exists ?

Regards,
mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#236889
Moderators: ForumSupporttomeperica
Time to create page: 0.220 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here