dependsOn icon indicating copy to clipboard operation
dependsOn copied to clipboard

Issues with form loaded via AJAX

Open ownede opened this issue 8 years ago • 1 comments

Hello,

In my app, I'm showing a modal window, which a form, that is being loaded via AJAX. It's HTML is added using $().html() jQuery method.

Unfortunately, even when adding dependencies after adding HTML form content, as seen below:

$('.ajax-content', modal).html(response);
initProductDependencies();

...

function initProductDependencies()
{
        $('#something').dependsOn({
            '#otherthing': {
                checked: true
            }
        });
}

I got an error message saying:

Uncaught TypeError: Cannot read property 'nodeName' of undefined

Any workarounds?

ownede avatar Nov 18 '16 16:11 ownede

@ownede could you provide for of your code? Its hard to diagnose without more context.

dstreet avatar Nov 18 '16 18:11 dstreet