Bug Tracker

Modify

Ticket #6010 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

bug request with getJSON options is null

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

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

ad-product-1.0.js Download (781 bytes) - added by gtraxx 4 years ago.

Change History

Changed 4 years ago by gtraxx

comment:1 Changed 4 years ago by john

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

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/

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.