I'm trying to collect data from a form to use in a function, but it doesn't seem to be working. I'm using Dreamweaver to write the code. Here is what I have. This is the JS function that I use.
Code: Select all
<script type="text/javascript">function printnum(){$ft = document.getElementById('db').valueDocument.Write($ft)}</script>Code: Select all
<form id="form1" name="form1" > <label> <input type="text" name="db" /> Dry Bulb Temp(Celsius)</label> <p> <label> <input type="text" name="wb" /> Wet Bulb Temp(Celsius)</label> </p> <p> <label> <input type="text" name="pr" /> Ambient Pressure(Millibars)</label></p> <p> <label> <input type="submit" name="Submit" value="Calculate" onclick="printnum(document.form1)"/> </label> </p></form>