In general, there is a website with a bunch of things that use jquery.min.js(jQuery JavaScript Library v1.4.4)
And there is an ajax request that works on jQuery 1.8.0, but does not work on 1.4.4 (why, I don't know, I don’t rummage in this). Help it under 1.4.4 remake.
Here is the script:
function selectModel(Obj) { var auto = Obj.value; $.ajax({ type: "POST", url: "/ajax/ajaxbase/modelcheckbox", data: { auto: auto }, /*dataType: "json",*/ cache: false, success: function (responce) { $('div[name="model_panel"]').html(responce); } }); };
UPD Found a typo in the ajax / ajaxbase / modelcheckbox file Fixed, but now the error is as follows
Uncaught SyntaxError: Unexpected end of input http://127.0.0.6/:1 Uncaught ReferenceError: selectModel is not defined http://127.0.0.6/:468
Line 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Line 468: <li><input type='checkbox' name='auto[]' id='auto1' value='Acura' onclick='javascript:selectModel(this);'/><label for='auto1' >Acura</label></li>
UPD2 Problem solved, upd1 arose due to a randomly erased closing brace