| Код | function getMsg(){ var id_to=$("#agent input[name='id_to']").val(); var msgId=$("#agent input[name='lastmsgId']").val();
var dataReq = {id_to: id_to, lastmsgId: msgId};
if(id_to!=undefined){ $.ajax({ cache: false, type: "POST", scriptCharset: "utf-8", contentType: "application/xml; charset=utf-8", url: "agent/getmsg.php", data: dataReq, dataType: "xml", success:function(xml){ $(xml).find("note").each( function(){ $("#agentMsgWindow").append($(this).find("msg").text()+"<br>"); $("#agent input[name='id_to']").val($(this).find("idto").text()); $("#agent input[name='lastmsgId']").val($(this).find("msgid").text()); } ); } }); } }
|
Помогите пож разобраться в функции, она почему-то не посылает данные id_to и lastmsgId (6 строка) |