Project Detail

Simple Javascript Coding  

Simple Javascript Coding is project number 280059
posted at GetAFreelancer.com. Click here to post your own project.

 

Bookmark and Share
Free Trial For New Buyers
 

Status: Closed
(Selected Service Provider)

Selected Providers: asaikiran1979

Budget: $30-250

Created: 06/27/2008 at 15:55 EDT

Bid Count: 1

Average Bid: $ 30

06/28/2008 at 15:55 EDT

Project Creator: w3wok View PM Post PM
Employer Rating: (No Feedback Yet)

Bid On This Project
 

Description

I NEED THIS IN 30 MIN!!!!! ALL BIDS WELCOME

Brief: 3 loops added to Javascript code below

Instructions Are attached:

<script type="text/javascript">
/*document.write("Vadim Kushnir");
document.write("");
document.write("Janin V");
document.write("Javascript 2");*/
var customer = prompt("Welcome to Vadim's Ice Cream Shop! What is your name please?", "Your Name");
alert("Hello "+customer+ " please first look at our great variety of ice cream, then place your order.");

var flavor = prompt("What flavor of ice cream do you wish to have?", "enter your flavor request");

if(flavor== "vanilla")
price = 1*(1.99);
if(flavor== "chocolate")
price = 2.00;
if(flavor== "lemon")
price = 2.99;
if(flavor== "mint")
price = 1.00;
if(flavor== "strawberry")
price = .99;
if(flavor== "blueberry")
price = 3.21;

var scoops= prompt("How many scoops of " +flavor+ " would you like to have?");
{
var ask= confirm(customer+" would you like to purchase "+scoops+" scoops of " +flavor+" ?");
if (ask== false)
{
alert(" Please reload the page when you are ready to order!");
}
else
{

}
}

var cone= 1* .75
var njtax= 1* .07
var totalcost= (Number(scoops)* Number(price)+ Number(cone));

if (flavor=="mint" && scoops==Number(3) )
{
totalcost=(Number(scoops)* Number(price)+ Number(cone)*.85);
}
if ( flavor=="chocolate" && scoops==Number(2) )
{
totalcost=(Number(scoops)* Number(price)+ Number(cone)*.88);
}
if (flavor=="chocolate" && scoops>=Number(4) )
{
(Number(scoops)* Number(price)+ Number(cone)*.83);
}

var total= (Number(totalcost)* Number(njtax)+ Number(totalcost));
document.write(customer+', the cost of <i>'+scoops+'</i> scoops of <b>'+flavor+'</b> flavored ice cream is '+totalcost+ '<br> With tax, the total comes to <u>'+total.toFixed(2)+'</u><br>');



if (flavor=="chocolate" && scoops==Number(2) || flavor=="chocolate" && scoops>=Number(4) || flavor=="mint" && scoops==Number(3))


document.write("Thank you for purchasing one of our specials!")
else
document.write("")

</script>les tax.


Additional files submitted:
instructions.rtf
ordercones.html

Messages Posted: 0 View project clarification board Post message on project clarification board

Bid On This Project
 
If you are the project creator or one of the bidders Log In for more options

  View PM Post PM

30

0 days

06-27-2008 16:01 EDT

Hi, Please see my PM. Thank you.

help

    Bid on this Project