Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#inviaRichiesta').on('click', function(){
- $budget = $('#price').val();
- $cpu = $('#pcpu').val();
- $gpu = $('#pgpu').val();
- // $utilizzo = $('#uti').val();
- $scelta = $cpu.concat($gpu);
- $gaming = {
- 'AMDAMD' : {
- '400€' : '',
- '500€' : '',
- '600€' : '',
- '700€' : '',
- '800€' : '',
- '900€' : '',
- '1000€' : '',
- '1100€' : '',
- '1200€' : '',
- '1300€' : '',
- '1400€' : '',
- '1500€' : '',
- },
- 'AMDINTEL': {
- '400€' : '',
- '500€' : '',
- '600€' : '',
- '700€' : '',
- '800€' : '',
- '900€' : '',
- '1000€' : '',
- '1100€' : '',
- '1200€' : '',
- '1300€' : '',
- '1400€' : '',
- '1500€' : '',
- },
- 'AMDNVIDIA' : {
- '400€' : '',
- '500€' : '',
- '600€' : '',
- '700€' : '',
- '800€' : '',
- '900€' : '',
- '1000€' : '',
- '1100€' : '',
- '1200€' : '',
- '1300€' : '',
- '1400€' : '',
- '1500€' : '',
- }
- };
- if($budget === '-- Prezzi Disponibili --'){
- alert('Inserire un prezzo valido');
- }
- if($gaming[$scelta] == undefined){
- alert('Inserire una scelta valida!');
- }else{
- if($gaming[$scelta][$prezzo] == undefined){
- alert('Inserire un prezzo valido!');
- }else{
- $configurazioneScelta = $gaming[$scelta][$prezzo];
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment