![]() |
Help Please with Javascript
I need help with this code. I have written it and the only part that works is the calculation of cost for the fruits. The other part where requires to validate the values does not work i.e if i put the values beyond 99 in textboxes, it is suppose to say..the values are suppose to be between 0-99, but it does not do that. Any help would be appreciated.
Thanks Code:
<?xml version = "1.0" encoding = "utf-8" ?> |
You never CALL the (VERY badly misnamed) function validateForm!
|
And this code is total hash:
Code:
document.getElementById("btnTotalCost").onclick = function(){ |
Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful.
BTW, when posting here please help us to help you by following the posting guidelines and wrapping your code in CODE tags. This means use the octothorpe or # button on the toolbar. You can (and should) edit your previous post. if(this.value==""){ What if the user enters a space or a letter or a ? <input type = "Submit" value = "Submit" /> This does nothing but as you are not actually submitting a form to a server you should use <input type = "button" |
| All times are GMT +1. The time now is 08:39 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.