Click to See Complete Forum and Search --> : Help with calculate.js


pla
12-12-2003, 09:54 AM
HI:D

I am trying to use the calculate.js for a different type of 'addition' rather than an inventory or sales sheet. Nevertheless, I cannot get it to run. I keep getting an error and it will not calculate.
I have attached my files in a zip.
ANY HELP OR INSIGHT???:confused:

Thank you in advance for any assistance:p

David Harrison
12-12-2003, 11:50 AM
The reason that your script isn't working is because your HTML is a disaster. Whenever you write a page, always make sure it validates (http://validator.w3.org/) with no errors. The problem area is around here:

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<script src="calculate.js" type="text/javascript">
</script>
<center>

You have opened the head which is already opened and is never closed on the page, then you open a script tag and then another and only close one, this is what it should be:

<script src="calculate.js" type="text/javascript"></script>

</head>

<body>

<center>

I have uploaded the corrected version and it works fine. By the way, if you're going to use someone elses script then you should leave their credits in.

pla
12-12-2003, 12:06 PM
Lavalamp,
Please remember that we all have to learn!!! I don't think your comment of 'your HTML is a disaster' was very nice:mad:
Furthermore, I loaded your returned version and continue to receive an error message and it does not work.

Additionally, I was obviously not done with this javascript and was cutting and pasting like a fool. Therefore, the credits were going to be left in!!!:(

If you feel you must chastise while helping someone, perhaps you are not the best suited for 'support'

olerag
12-12-2003, 12:11 PM
Oh, I think "lava"'s pretty tame and his/her suggestions are
typically right on. Its a good thing "lava" got ahold of it
before Charles.

By the way, where is Charles????

pla
12-12-2003, 12:25 PM
Obviously I haven't been doing this too long and may not realize that this is how you treat one another.
Thanks anyway

David Harrison
12-12-2003, 12:56 PM
I'm sorry if I was a little bit harsh. But I think I've fixed the script now, I noticed that you had missed out a few document.'s.

pla
12-12-2003, 01:01 PM
Thanks. I had figured it out by what you had referred to.
Thanks again.:)

David Harrison
12-12-2003, 01:16 PM
Happy to help. :)
Sorry to offend. :(