Are you saying that eventually the text box "distance" will already be prefilled with other info, and you just want to append the value of new calculation that is called with onclick="calculateDistances();" to the end of the existing text? Or am I missing what you are asking.

falent

06-25-2012, 11:45 AM

I have to send information about distance to a form (field odleglosc). It doesn't work what I have done:

Odleglosc:
<input type="text" id="distance"/>

The variable "distance" should be displayed in a field Odleglosc in a form.

Note: I just commented out that one line in case you still planned to use it elsewhere.

falent

06-25-2012, 04:03 PM

I'm sorry but it doesn't work :(

I have made a photo with place where I would like to display a "distance" variable

http://i46.tinypic.com/34edqhx.jpg

Here is a website with this script

http://formularz.fo.funpic.de/inny.php

EpicWebDesign

06-26-2012, 01:39 PM

It does work, you just forgot to move the line up above the "}" which closed the call function :) I copied your entire source code and just moved that one line and it functions exactly how you want it to