Bug Tracker

Opened 6 years ago

Closed 6 years ago

#6010 closed bug (invalid)

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); )); )); ));

Change History (1)

comment:1 Changed 6 years ago by john

  • Resolution set to invalid
  • Status changed from new to closed

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/

Note: See TracTickets for help on using tickets.