Skip to main content

Bug Tracker

Side navigation

#8082 closed bug (fixed)

Opened January 28, 2011 01:20PM UTC

Closed January 29, 2011 12:39AM UTC

Last modified March 13, 2012 05:55PM UTC

data passed to ajax success handler is undefined when dataType is script (1.5rc1)

Reported by: malsup Owned by: jaubourg
Priority: high Milestone: 1.5
Component: ajax Version: 1.5rc1
Keywords: Cc:
Blocked by: Blocking:
Description

I suppose you could argue that this makes sense, but it is decidedly different behavior from previous versions of jQuery.

Example: http://jquery.malsup.com/test15rc1.html

Same test using jQuery 1.4.4: http://jquery.malsup.com/test144.html

Attachments (0)
Change History (4)

Changed January 28, 2011 01:21PM UTC by malsup comment:1

component: unfiledajax

Changed January 28, 2011 01:29PM UTC by malsup comment:2

description: I suppose you could argue that this makes sense, but it is decidedly different behavior from previous versions of jQuery. \ \ Example: http://jquery.malsup.com/test15rc1.html \ \ I suppose you could argue that this makes sense, but it is decidedly different behavior from previous versions of jQuery. \ \ Example: http://jquery.malsup.com/test15rc1.html \ \ Same test using jQuery 1.4.4: http://jquery.malsup.com/test144.html

Changed January 29, 2011 12:09AM UTC by jitter comment:3

milestone: 1.next1.5
owner: → jaubourg
priority: undecidedhigh
status: newassigned

This looks like a valid regression. The api docs for jQuery.ajax() explicitly mention this behavior

"script": Evaluates the response as JavaScript and returns it as plain text. Disables caching unless option "cache" is used.

jsFiddle version of the test case

Changed January 29, 2011 12:39AM UTC by jaubourg comment:4

resolution: → fixed
status: assignedclosed

Fixes #8082. Text to script converter now returns text. Unit test added.

Changeset: 85a195c6d5ad6fccf9dd3df40ebecc338325d461