Javascript in threads
Author
Discussion

sprior

Original Poster:

96 posts

262 months

Saturday 6th March 2004
quotequote all
The content below worked just as I wanted when I used 'preview', but it didn't work when I posted the message for real.

Is this sort of thing permitted, and if so, any advice how to do it?

<script language = "JavaScript">function calc(){document.Accel.Accel.value = Math.floor(100*(document.Accel.Finish.value - document.Accel.Start.value)*(4/9)/document.Accel.Time.value/9.81)/100;}</script><FORM METHOD="get" NAME="Accel" ALIGN="CENTER"> <TABLE> <TR> <TD>Start speed (mph)</TD> <TD> <INPUT TYPE="TEXTBOX" SIZE=8 NAME="Start" VALUE="0" OnKeyUp='calc()'></TD></TR><TR><TD>Finish speed (mph)</TD><TD><INPUT TYPE="TEXTBOX" SIZE=8 NAME="Finish" VALUE="60" OnKeyUp='calc()'></TD></TR><TR><TD>Time (sec)</TD><TD><INPUT TYPE="TEXTBOX" SIZE=8 NAME="Time" VALUE="3.8" OnKeyUp='calc()'></TD></TR><TR><TD>Average Acceleration (g)</TD><TD><INPUT TYPE="TEXTBOX" SIZE=8 NAME="Accel" VALUE="CALC" OnKeyUp='calc()'></TD></TR></TABLE></FORM><script language = "JavaScript">document.Accel.Accel.value = Math.floor(100*(document.Accel.Finish.value - document.Accel.Start.value)*(4/9)/document.Accel.Time.value/9.81)/100;</script>

Ahhh!!!
It works here......
will try again where I posted originaly, then delete it from here if it's OK

>>> Edited by sprior on Saturday 6th March 19:42

now it doesn't

>>> Edited by sprior on Saturday 6th March 19:43

Pies

13,116 posts

274 months

Saturday 6th March 2004
quotequote all
Javascript does not work in threads except the opening post

Thus Ted can keep control of the way the forum is displayed

sprior

Original Poster:

96 posts

262 months

Saturday 6th March 2004
quotequote all
thanks!

this explains everything.

Simon