Skip to main content

Bug Tracker

Side navigation

#9763 closed bug (worksforme)

Opened July 07, 2011 01:01AM UTC

Closed July 07, 2011 06:34AM UTC

Last modified March 14, 2012 04:36AM UTC

getJSON() doesn't execute callback function when formatted certain ways

Reported by: Owned by:
Priority: low Milestone:
Component: ajax Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

'''This doesn't work:'''

$.getJSON("ForgotYourPassword.php", function() {

console.log("Won't be outputted");


but this does:

$.getJSON("ForgotYourPassword.php", login_forgotYourPassword2());



console.log("Will be outputted");


Attachments (0)
Change History (4)

Changed July 07, 2011 01:11AM UTC by anonymous comment:1


JSON was improperly formatted.

Changed July 07, 2011 06:34AM UTC by addyosmani comment:2

component: unfiledajax
priority: undecidedlow
resolution: → worksforme
status: newclosed

As confirmed by the original ticket submitter, this issue has now been resolved. Marking as worksforme/user error.

Changed July 07, 2011 01:41PM UTC by rwaldron comment:3

For good measure, the only reason your second example "worked" was because the function expression was being invoked with ()

Changed July 07, 2011 02:35PM UTC by anonymous comment:4

Thank you! Apologies about the false alarm.