Please can someone cut this, correct it in notepad and paste it back in a reply im desperate its for some work im doing and im running out of time.... <HTML> <HEAD> <TITLE> Deliver Charges </TITLE> <SCRIPT LANGUAGE = "JavaScript"> // A delivery charge program var orderValue; // How much the order is worth orderValue = window.prompt('How much is the order worth in Pounds Sterling?',''); document.write('The value of your order is £' + orderValue + '.<BR>'); orderValue = parseFloat(orderValue); if (orderValue <= 24.99) { document.write('Your Charge For Delivery Is £3') } else { if (orderValue 25<=99.99) { document.write('Your Delivery Is Free Of Charge') } else { if (orderValue 100 >) { document.write('Your Deliver Is Free And Comes With A Complimentry Gift Vocher') } } } document.write('<BR>'); document.write('Thank you for shopping with us.'); </SCRIPT> </HEAD> <BODY> </BODY> </HTML>
Hello Majo, and welcome! Here you have it... <script type="text/javascript"> // A delivery charge program var orderValue; // How much the order is worth orderValue = parseFloat(orderValue); orderValue = window.prompt('How much is the order worth in Pounds Sterling?', '23'); if ( orderValue <= 24.99 ) { document.write('Your Charge For Delivery Is £3'); } else if ( orderValue <= 99.99 ) { document.write('Your Delivery Is Free Of Charge'); } else if ( orderValue < 100 ) { document.write('Your Deliver Is Free And Comes With A Complimentry Gift Vocher'); } document.write('The value of your order is £' + orderValue + '.<BR>'); document.write('<BR>'); document.write('Thank you for shopping with us.'); </script> Code (markup):
Thank you so much for you help mate but theres just one more bit of help i need when i put in a value for example 56 i get this come up Your Delivery Is Free Of ChargeThe value of your order is £56. Thank you for shopping with us which is correct mate dont get me wrong but where do i insert the <BR> tag to make "The Value of your order is £56" appear on a seperate line
Just add your linbreaks or anything else like this: document.write('<br>The value of your order is £' + orderValue + '.<br>');