javascript - Uncaught TypeError undefined is not a function when called outside of jQuery -
i'm trying figure out why when call setupcontrolbox within $.getjson call works (in if condition) if call else condition throws undefined error (i set opts.load_url false). call have encapsulated in $.somefunction()?
// load existing form data if (opts.load_url) { $.getjson(opts.load_url, function(json) { form_db_id = json.form_id; fromjson(json.form_structure); opts.loaded(json); var controlbox = setupcontrolbox(opts.control_box_target); }); } else { var controlbox = setupcontrolbox(opts.control_box_target); }
Comments
Post a Comment