Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with form loaded via AJAX #37

Open
ownede opened this issue Nov 18, 2016 · 1 comment
Open

Issues with form loaded via AJAX #37

ownede opened this issue Nov 18, 2016 · 1 comment

Comments

@ownede
Copy link

ownede commented Nov 18, 2016

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?

@dstreet
Copy link
Owner

dstreet commented Nov 18, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants