html/javascript help?

curious1

New member
my assignment is to creat an order form. and needs to include the following:
Have background and font color and faces of your choice, it should contain:
a. a company name (make up a name) and a logo image at the top of the page.
b. a title of Order Form
c. an order form with the following input - each with a name and size:
Name - type text
Password - type password
Purchase Item Number - type text
Ship to Information of:
Street - type text
City - type text
State - type text, size 2, value CA
Zip Code - type text
3 Radio buttons for shipping - US Post - UPS - Fedex
A check box to indicate if the item should be gift wrapped or not
A Submit button and a Reset button



everything is pretty much working except for when i click on gift wrap the box doesn't pop up saying theres a fee of $5.00 and also after i click submit nothing happens.

heres my code

<html>




<head>




<title>Order Form</title>




<script type=text/javascript>




function reply(who, what)

{

document.write(who.value,“Thank you for your order of”, what.value);

}


</script>




</head>




<Body bgcolor=green text=white link=orange alink=yellow>

<img src=fashionlogo.jpg alt="logo"><br>
<font face=*Comic Sans* size 28>I Love Fashion</font><br><br>


<form name=*orders*>




name <input type=text name=user size=15><br>

Password <input type=password name=user size=15><br>

purchase item number <input type=text name=user size=15><br>

<font face=*Comic Sans* size 15>Ship to:</font><br>

Street<input type=text name=item size15><br>

City<input type=text name=item size15><br>

State<input type=text name=item size2><br>

Zip code<input type=text name=item size15><br>



Shipping<br>

<input type=radio name=ship value=usmail>US Mail<br>

<input type=radio name=ship value=fedex>Fedex<br>

<input type=radio name=ship value=ups>UPS<br><br>






<input type=checkbox name=wrap value=wrap onclick=“alert('There is a $5.00 fee for Gift wrap')”;>Gift Wrap<br><br>

<input type=button value=Submit onclick=“reply(user,item)”;>

<input type=Reset><br>

</form>

</body>

</html>
THANK YOU SOOOOOOOO VERY MUCH!!!
after i edited those things, after i press submit, it says
undefinedThank you for your order ofundefined


also how would i do this?
State - type text, size 2, value CA
 
You're using different type of quotes than are allowed. You're using open and closing quotes. The ones you're using look like:

“reply(user,item)”

Change the quotes to the standard quotation mark, " . So your code will look like:

"reply(user,item)"

Also, it's important to note that when assigning values to attributes, make sure to wrap quotes around the values. For example, instead of:

type=checkbox

Use:

type="checkbox"
 
Back
Top