If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

OnChange Function

I know this is a fairly noob question but I have not worked with JavaScript since I was in Uni
Will make it up to you with addressing what I can in the PHP Selection

But, really simply I have 3 fields to input numbers.
When a number is entered I want JavaScript to supply a calculation based on this.
Easy rite??

The problem is that I cannot get JavaScript to write anything to the page So I am doing something wrong.
I want JavaScript to act as details are entered, please help so that I can place data on the page.

The code below is how far I have got, I am hoping the math is easy but I just need something to be printed to the page when a field is changed to start with,

I would be happy if this printed hello to the page at the moment
Problem is that I get the page I want to start with but I am needing this to dynamically change as fields are complete.
I have spent that last 5 hours on Google trying to make something happen and Firebug is recording the function request, just no processing of it

I don't know what the calculations are supposed to do, so I just summed the values.

Couple of problems with original script. Might want to check error console if you are using FF or Chrome browsers.

1. float is not a definition in JS
2. Access the contents using getElementById (not getElementByID)
and provide an attribute of the element, ie value in this case for a textbox entry.
3. document.write will reset script to initial load conditions every time it is called.
4. Added some error checking for invalid entries.