tab4.js 1022 B

123456789101112131415161718192021222324252627282930
  1. function getPdlGestiuni()
  2. {
  3. var params = '';
  4. params += '&fsync_option_filterstock=' + document.getElementById("fsync_option_filterstock_hidden").value;
  5. params += '&shop=' + document.getElementById("fsync_shop_hidden").value;
  6. params = encodeURI(params);
  7. var xhttp;
  8. xhttp = new XMLHttpRequest();
  9. xhttp.onreadystatechange = function() {
  10. if (this.readyState == 4 && this.status == 200) {
  11. if( this.responseText != '')
  12. {
  13. document.getElementById("fsync_option_filterstock").innerHTML = this.responseText;
  14. }
  15. }
  16. };
  17. xhttp.open("GET","ajax.php?random=" + Math.random() + "&action=getPdlGestiuni" + params,true);
  18. xhttp.send();
  19. }
  20. function submitStockOptionForm()
  21. {
  22. if(validateOption()) {
  23. document.getElementById('save-so-btn').classList.remove('btn-green');
  24. document.getElementById('save-so-btn').innerHTML = '<img src="View/img/loader.gif" />';
  25. document.getElementById('stock_option_form').submit();
  26. }
  27. }