Hello.

I uploaded a javascript called 'bmi.js' to a external server, and now I want to use it inside a form.

I have put both the javascript tag (line #1) and the form below.

How do I glue together both things to get a result in the form window BodyMassIndex?

<script type="text/javascript" src="http://javascripthost.com/s1/bin/bmi.js"></script>
<form  name="form" id="form">
<input type="Text" name="weight" size="4"> Weight (in Kilos)  
<input type="Text" name="height" size="4"> Height (in Centimeters)
<input type="Text" name="BodyMassIndex" id="BodyMassIndex" size="4"> BMI     
<input type="button" style="font-size: 8pt" value="Calculate" onClick="calculateBMI()" name="button">
<input type="reset" style="font-size: 8pt" value="Clear Form">
</form>

Many thanks!

Hi
your bmi.js script is got script tags in it; which means its not a valid javascript file.

if you have access to the script get rid of the tags, if you don't copy and paste the script into your html form

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.