Sclafus

Untitled

Apr 15th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. $('#inviaRichiesta').on('click', function(){
  2. $budget = $('#price').val();
  3. $cpu = $('#pcpu').val();
  4. $gpu = $('#pgpu').val();
  5. // $utilizzo = $('#uti').val();
  6.  
  7. $scelta = $cpu.concat($gpu);
  8.  
  9. $gaming = {
  10. 'AMDAMD' : {
  11. '400€' : '',
  12. '500€' : '',
  13. '600€' : '',
  14. '700€' : '',
  15. '800€' : '',
  16. '900€' : '',
  17. '1000€' : '',
  18. '1100€' : '',
  19. '1200€' : '',
  20. '1300€' : '',
  21. '1400€' : '',
  22. '1500€' : '',
  23. },
  24. 'AMDINTEL': {
  25. '400€' : '',
  26. '500€' : '',
  27. '600€' : '',
  28. '700€' : '',
  29. '800€' : '',
  30. '900€' : '',
  31. '1000€' : '',
  32. '1100€' : '',
  33. '1200€' : '',
  34. '1300€' : '',
  35. '1400€' : '',
  36. '1500€' : '',
  37. },
  38. 'AMDNVIDIA' : {
  39. '400€' : '',
  40. '500€' : '',
  41. '600€' : '',
  42. '700€' : '',
  43. '800€' : '',
  44. '900€' : '',
  45. '1000€' : '',
  46. '1100€' : '',
  47. '1200€' : '',
  48. '1300€' : '',
  49. '1400€' : '',
  50. '1500€' : '',
  51. }
  52. };
  53. if($budget === '-- Prezzi Disponibili --'){
  54. alert('Inserire un prezzo valido');
  55. }
  56. if($gaming[$scelta] == undefined){
  57. alert('Inserire una scelta valida!');
  58. }else{
  59. if($gaming[$scelta][$prezzo] == undefined){
  60. alert('Inserire un prezzo valido!');
  61. }else{
  62. $configurazioneScelta = $gaming[$scelta][$prezzo];
  63. }
  64. }
  65. });
Advertisement
Add Comment
Please, Sign In to add comment