Opened 13 years ago
Closed 13 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); )); )); ));
Attachments (1)
Change History (2)
Changed 13 years ago by
Attachment: | ad-product-1.0.js added |
---|
comment:1 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → 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/