home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / sharewar / guru / js / uloz.js < prev    next >
Encoding:
JavaScript  |  2001-11-12  |  1.8 KB  |  82 lines

  1. // writen by Petr KleteΦka (kletecka@email.cz)
  2.  
  3. function ulozData() {
  4.  
  5. // definice prom∞nejch a vodka∩ sou
  6.  
  7. var firma = document.input.firma.value
  8. var vobor = document.input.vobor.value
  9. var jmeno = document.input.jmeno.value
  10. var pozice = document.input.pozice.value
  11.  
  12. var ulice = document.input.ulice.value
  13. var mesto = document.input.mesto.value
  14. var psc = document.input.psc.value
  15.  
  16. var tel = document.input.tel.value
  17. var gsm = document.input.gsm.value
  18. var url = document.input.url.value
  19. var mail = document.input.mail.value
  20.  
  21. // msie patch
  22.  
  23. if(firma == ""){firma=" "}
  24. if(vobor == ""){vobor=" "}
  25. if(jmeno == ""){jmeno=" "}
  26. if(pozice == ""){pozice=" "}
  27.  
  28. if(ulice == ""){ulice=" "}
  29. if(mesto == ""){mesto=" "}
  30. if(psc == ""){psc=" "}
  31.  
  32. if(tel == ""){tel=" "}
  33. if(gsm == ""){gsm=" "}
  34. if(url == ""){url=" "}
  35. if(mail == ""){mail=" "}
  36.  
  37. if(firma == "null"){firma=" "}
  38. if(vobor == "null"){vobor=" "}
  39. if(jmeno == "null"){jmeno=" "}
  40. if(pozice == "null"){pozice=" "}
  41.  
  42. if(ulice == "null"){ulice=" "}
  43. if(mesto == "null"){mesto=" "}
  44. if(psc == "null"){psc=" "}
  45.  
  46. if(tel == "null"){tel=" "}
  47. if(gsm == "null"){gsm=" "}
  48. if(url == "null"){url=" "}
  49. if(mail == "null"){mail=" "}
  50.  
  51. if(firma == "undefined"){firma=" "}
  52. if(vobor == "undefined"){vobor=" "}
  53. if(jmeno == "undefined"){jmeno=" "}
  54. if(pozice == "undefined"){pozice=" "}
  55.  
  56. if(ulice == "undefined"){ulice=" "}
  57. if(mesto == "undefined"){mesto=" "}
  58. if(psc == "undefined"){psc=" "}
  59.  
  60. if(tel == "undefined"){tel=" "}
  61. if(gsm == "undefined"){gsm=" "}
  62. if(url == "undefined"){url=" "}
  63. if(mail == "undefined"){mail=" "}
  64.  
  65.  
  66. // zßpis dat pro pozd∞j╣φ pou╛itφ
  67. ZapisCookie("firma",firma,10)
  68. ZapisCookie("vobor",vobor,10)
  69. ZapisCookie("jmeno",jmeno,10)
  70. ZapisCookie("pozice",pozice,10)
  71.  
  72. ZapisCookie("ulice",ulice,10)
  73. ZapisCookie("mesto",mesto,10)
  74. ZapisCookie("psc",psc,10)
  75.  
  76. ZapisCookie("tel",tel,10)
  77. ZapisCookie("gsm",gsm,10)
  78. ZapisCookie("url",url,10)
  79. ZapisCookie("mail",mail,10)
  80.  
  81. }
  82.