pastebin

Paste Search Dynamic
Recent pastes
mobile
  1. function setDelivery(price, delivery_id) {
  2.     document.getElementById('delivery_price').innerHTML = price;
  3.     document.getElementById('d').value = delivery_id;
  4. }
  5.  
  6. function setPayment(name, payment_id) {
  7.     document.getElementById('payment_name').innerHTML = name;
  8.     document.getElementById('order_metod').value = payment_id;
  9. }
  10.  
  11. function setOption(style) {
  12.     var ga = document.createElement('link');
  13.     ga.rel = 'stylesheet';
  14.     ga.async = true;
  15.     ga.href = '/phpshop/templates/mobile/ratchet/css/' + style;
  16.     var s = document.getElementsByTagName('script')[0];
  17.     s.parentNode.insertBefore(ga, s);
  18.  
  19.     setCookie('mobile_skin', style, 10);
  20. }
  21.  
  22. function go(page) {
  23.     return window.location.replace(page);
  24. }
  25.  
  26.  
  27. function modal_on(name) {
  28.     document.getElementById(name.replace("#", "")).className = 'modal.active';
  29. }
  30.  
  31. function modal_off(name) {
  32.     document.getElementById(name.replace("#", "")).className = 'modal';
  33. }
  34.  
  35. function setCookie(name, value, days) {
  36.     var today = new Date();
  37.     expires = new Date(today.getTime() + days * 24 * 60 * 60 * 1000);
  38.     document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString();
  39. }
  40.  
  41. function addCartOption(xid) {
  42.     var name = "allOptionsSet" + xid;
  43.     if (document.getElementById(name)) {
  44.         addname = document.getElementById(name).value;
  45.     } else {
  46.         addname = "";
  47.     }
  48.     window.location.replace('/order/?from=html&id='+xid+'&addname=t'+addname);
  49. }
Parsed in 0.010 seconds