I'm new to JavaScript. I'm trying to create a web store. It's not processing though. Here's my code. What's wrong?
Code:<html> <head> <title>Videogame Store</title> <script language = "javascript"> var order,cost,Games; function ProcessGamesCallofDuty4() { Games=1; } function ProcessGamesFallout3() { Games=1; } function ProcessGamesUnrealTournament3() { Games=1; } function ProcessGamesMortalKombat() { Games=1; } function ProcessOrder() { order = "VideoGames: "; cost=1.85 if(VideoGames.PS3.checked) Order += "PS3"; if(VideoGames.360.checked) order += "Xbox 360"; if(VideoGames.PC.checked) order += "PC"; order += "\nWith:\n"; if(VideoGames.ExtraController.checked) {order += " Extra Controller\n"; cost += .50;} if(VideoGames.HDMI.checked) {order += " HDMI Cable\n"; cost += .50;} if(VideoGames.CoolingFan.checked) {order += " Cooling Fan\n"; cost += .50;} if(VideoGames.system.value=="PS3") {order += " PS3\n"; cost += .50;} if(ExtraController==1) {order += " Extra Controller\n"; cost += .50;} cost = parseInt(cost*100)/100; VideoGames.Order.value = order; VideoGames.Cost.value = cost; } </script> </head> <body color = "31 b5 d6"> <font color = "00 00 ff" size = "7"> <center> Videogame Store </center> </font> <form name = "VideoGames"> <table border = "3"> <tr> <td width = "400"> <u>Acessories</u> </tr> <tr height = "12"></tr> <tr> <td width = "400"><input type = "checkbox" name = "HDMI Cable">HDMI Cable <td width = "300"><input type = "checkbox" name = "Extra Controller">Extra Controller <td width = "400">console: <input type = "radio" name = "console onClick" = "ProcessConsolesPS3()">PS3 <input type = "radio" name = "console onClick" = "ProcessConsoles360()">360 <input type = "radio" name = "console onClick" = "ProcessConsolesPC()">PC </tr> <tr> <td width = "400"><input type = "checkbox" name = "Cooling Fan">Cooling Fan <td width = "300"><input type = "checkbox" name = "Xbox Live Annual Subscription">Xbox Live Annual Subscription </tr> <tr> <td width = "400"><input type = "checkbox" name = "Ethernet Cord">Ethernet Cord <td width = "300"><input type = "checkbox" name = "WiFi Card">WiFi Card <td width = "400">Games: <select name = "Games"> <opion value = "No">No <option value = "CallofDuty4"> Call of Duty 4 <option value = "Fallout3"> Fallout 3 <option value = "UnrealTournament3"> Unreal Tournament 3 <option value = "MortalKombat"> Mortal Kombat vs. DC Universe </select> </tr> </table> <br><br><br> <textarea name = "Order" readonly cols = "60" rows = "5" wrap></textarea> Price: <input name = "Price" readonly> <center> <br> <input type = "reset" value = "reset"> <input type = "button" value = "place order" onclick = "ProcessOrder()"> </center> </form> </body> </html>


Reply With Quote
Bookmarks