Hi,
- I'm using PJAX to load a bunch of HTML + javascript, let's call this JS-A
- In JS-A, there is an inline function called
parse_jsonp()
- JS-A also makes a JSONP call using
$.ajax with the callback of parse_jsonp
- However, the
$.ajax call returns with an error ReferenceError: parse_jsonp is not defined
$.ajax runs parse_jsonp correctly when the page is loaded normally (non-PJAX).
So the question is, since JS-A (including parse_jsonp()) was loaded by PJAX, why is it undefined when called? Thank you.
Hi,
parse_jsonp()$.ajaxwith the callback ofparse_jsonp$.ajaxcall returns with an errorReferenceError: parse_jsonp is not defined$.ajaxrunsparse_jsonpcorrectly when the page is loaded normally (non-PJAX).So the question is, since JS-A (including
parse_jsonp()) was loaded by PJAX, why is it undefined when called? Thank you.