0

I'm having an issue where I have a page with a bunch of user interface based tabs. When a particular tab gets hit, an HTML form gets retrieved via XHR. That form has JavaScript embedded in it, some jQuery ajax form handlers, etc. Works fine and everything the first time the form is submitted. On subsequent submissions however, I get an error that looks like the following:

jQuery is not defined
[Break on this error] jQuery( function( $ ) { 

I'm not sure how this is happening, but when the form gets pulled back in, with the same exact JavaScript and jQuery handlers on subsequent submits, the error happens. Most browsers show the error, but handle it fine and the form continues to work. The wonderful IE6 however, displays an annoying dialogue box, so I need to fix this. It's as if jQuery isn't defined on subsequent submissions.

Any suggestions?

1 Answer 1

1

This sounds like jQuery is actually loaded again in the HTML code you retrieve.

Sign up to request clarification or add additional context in comments.

4 Comments

It definitely isn't, there isn't anything pulling it in the body of the xhr response.
@randombits strange. Can you show the code that is being pulled? Maybe there's something else.
@randombits and your incoming content is not doing anything in the document's head? Or sending along a full HTML structure including head and body?
It's not. just a fragment with <div>...content...<script>stuff</script></div>, trying to put together a demo outside of this app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.