Skip to main content

Bug Tracker

Side navigation

#6010 closed bug (invalid)

Opened February 02, 2010 02:28PM UTC

Closed February 02, 2010 02:52PM UTC

bug request with getJSON options is null

Reported by: gtraxx Owned by:
Priority: major Milestone:
Component: ajax Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:
Description

The ajax request getJSON not working well with version 1.4

I use a function that works very well with 1.3.2.

$ (function () (

$. getJSON ( "/ json / getidclc =" + $ ( 'select # idclc'). val (), function (j) (

var options = '<option value="0"> No subcategory </ option>';

for (var i = 0; i <j.length; i + +) (

options + = '<option value='" j[i].optionValue + +'">' + j [i]. optionDisplay + '</ option>';

)

$ ( "select # idcls"). html (options);

));

$ ( "select # idclc"). change (function () (

$. getJSON ( "/ json / getidclc =" + $ (this). val (), function (j) (

var options = '<option value="0"> No subcategory </ option>';

for (var i = 0; i <j.length; i + +) (

options + = '<option value='" j[i].optionValue + +'">' + j [i]. optionDisplay + '</ option>';

)

$ ( "select # idcls"). html (options);

));

));

));

Attachments (1)
Change History (1)

Changed February 02, 2010 02:52PM UTC by john comment:1

resolution: → invalid
status: newclosed

You need to make sure that the JSON being returned from your server isn't malformed, we now check for that in 1.4:

http://yehudakatz.com/2010/01/15/jquery-1-4-and-malformed-json/