I would be grateful if someone could please point out where i have went wrong in the following script. Before i wrote code windows prompted for a number of boxes, now nothing appears, but i cannot figure out where i have went wrong.
thankyou very much
thankyou very much
Code:
<HTML>
<HEAD>
<TITLE>Volume Discount</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
/* A program to tell a customer what volume discount they can expect */
var numberOfgiftboxes,
numberOfgiftboxes = window.promp
('Please enter how many boxes you are purchasing', type how many here, '');
numberOfgiftboxes = parseFloat(numberOfgiftboxes);
if (numberOfgiftboxes >= 0) & & (numberOfgiftboxes <= 3)
{
document.write('No Discount');
}
else
if (numberOfgiftboxes >= 4) & & (numberOfgiftboxes <= 11)
{
document.write('5 % Discount');
}
else
if (numberOfgiftboxes >= 12) & & (numberOfgiftboxes < 30)
{
document.write('10 % Discount');
}
else
if (numberOfgiftboxes >= 30)
{
document.write('20 % Discount');
}
}
}
}
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Comment