ajax.js 632 B

12345678910111213141516
  1. function ajax_sync_setting(wwwroot, settingid) {
  2. spare = $('#row_'+settingid).html();
  3. formobj = document.forms['settingsform'];
  4. url = wwwroot+'plugin/vchamilo/ajax/service.php?what=syncthis&settingid='+settingid+'&value='+encodeURIComponent(formobj.elements['value_'+settingid].value);
  5. /*if (formobj.elements['del_'+settingid].checked) {
  6. url += '&del=1';
  7. }*/
  8. $('#row_'+settingid).html('<td colspan="7"><img src="'+wwwroot+'plugin/vchamilo/pix/ajax_waiter.gif" /></td>');
  9. $.get(url, function (data) {
  10. $('#row_'+settingid).html(spare);
  11. $('#res_'+settingid).html(data);
  12. } );
  13. }