CA_randy
12-22-2003, 11:57 PM
I have a simple page w/ java script. I am converting from VBscripting to make more accessible from alternate browsers. When I compare to other pages w/ scripts nothing looks different to me. It would be best to fix this before I put any more time into this page. I would appreciate anyone who could help.
Here is page:
<HTML>
<HEAD>
<TITLE>The Simple Metric Converter-*2</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Convert2mm()
{
offsetdeduct = Offset_array.value;
if (Offset_array.value==98.1)
{
hoffsetdeduct = 70
}
else
{
hoffsetdeduct = Offset_array.value
}
InchesWidth = txtInchesWidth.value;
InchesHeight = txtInchesHeight.value;
mmWidth = eval(InchesWidth *25.4 - offsetdeduct);
mmHeight = eval(InchesHeight *25.4 - hoffsetdeduct);
mmWidth2 = Math.round(mmWidth);
mmHeight2 = Math.round(mmHeight);
mmsize.value=("A PVC window with a "+InchesWidth+" inches width and a "+InchesHeight+" inches height has an mm OSM of "+mmWidth2 + " mm Wide x " + mmHeight2+" mm High" );
txtmmwidth.value =(mmWidth2);
txtmmheight.value =(mmHeight2);
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<H1>PVC only!</H1>
<P>Select the size given, enter the size in inches, and click on the "Convert" button to calculate.</P>
<P>Please note: only OSM and RO sizes will work for MC</P>
<select Name="Offset_array" size "1">
<option value="0" selected>OSM</option>
<option value="20" >RO</option>
<option value="98" >2"Bmld 4 sides</option>
<option value="98.1" >2"Bmld w/ sill</option>
<!-- <option value="54" >1 1/4"Bmld</option> -->
<option value="54" >J-Trim Bmld</option>
</select>
<left><PRE><H3>Inches</h3><INPUT NAME="txtInchesWidth" SIZE=5 value="0" > Width<br> x <br><INPUT NAME="txtInchesHeight" SIZE=5 value="0" > Height</PRE></left>
<P><left><INPUT TYPE="BUTTON" NAME="cmdConvert" onclick="Convert2mm()" VALUE="Convert"></left>
<!--<left><H4>MM OSM of frame is:</h4><textarea NAME="mmsize" rows=4 cols=20></textarea></left></p>-->
<P><left><PRE><H4>MM OSM of frame</h4><textarea NAME="txtmmwidth" rows=2 cols=10></textarea> Width<P> x <P><textarea NAME="txtmmheight" rows=2 cols=10></textarea> Height </PRE></left></p>
<HR>
<p>1/8" = .125 <br>
3/8" = .375 <br>
5/8" = .625 <br>
7/8" = .875 <br>
</P>
<HR>
<left><H4>MM OSM of frame is:</h4><textarea NAME="mmsize" rows=4 cols=50></textarea></left></p>
</BODY>
</HTML>
THANKS!!!!
Randy
Here is page:
<HTML>
<HEAD>
<TITLE>The Simple Metric Converter-*2</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Convert2mm()
{
offsetdeduct = Offset_array.value;
if (Offset_array.value==98.1)
{
hoffsetdeduct = 70
}
else
{
hoffsetdeduct = Offset_array.value
}
InchesWidth = txtInchesWidth.value;
InchesHeight = txtInchesHeight.value;
mmWidth = eval(InchesWidth *25.4 - offsetdeduct);
mmHeight = eval(InchesHeight *25.4 - hoffsetdeduct);
mmWidth2 = Math.round(mmWidth);
mmHeight2 = Math.round(mmHeight);
mmsize.value=("A PVC window with a "+InchesWidth+" inches width and a "+InchesHeight+" inches height has an mm OSM of "+mmWidth2 + " mm Wide x " + mmHeight2+" mm High" );
txtmmwidth.value =(mmWidth2);
txtmmheight.value =(mmHeight2);
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<H1>PVC only!</H1>
<P>Select the size given, enter the size in inches, and click on the "Convert" button to calculate.</P>
<P>Please note: only OSM and RO sizes will work for MC</P>
<select Name="Offset_array" size "1">
<option value="0" selected>OSM</option>
<option value="20" >RO</option>
<option value="98" >2"Bmld 4 sides</option>
<option value="98.1" >2"Bmld w/ sill</option>
<!-- <option value="54" >1 1/4"Bmld</option> -->
<option value="54" >J-Trim Bmld</option>
</select>
<left><PRE><H3>Inches</h3><INPUT NAME="txtInchesWidth" SIZE=5 value="0" > Width<br> x <br><INPUT NAME="txtInchesHeight" SIZE=5 value="0" > Height</PRE></left>
<P><left><INPUT TYPE="BUTTON" NAME="cmdConvert" onclick="Convert2mm()" VALUE="Convert"></left>
<!--<left><H4>MM OSM of frame is:</h4><textarea NAME="mmsize" rows=4 cols=20></textarea></left></p>-->
<P><left><PRE><H4>MM OSM of frame</h4><textarea NAME="txtmmwidth" rows=2 cols=10></textarea> Width<P> x <P><textarea NAME="txtmmheight" rows=2 cols=10></textarea> Height </PRE></left></p>
<HR>
<p>1/8" = .125 <br>
3/8" = .375 <br>
5/8" = .625 <br>
7/8" = .875 <br>
</P>
<HR>
<left><H4>MM OSM of frame is:</h4><textarea NAME="mmsize" rows=4 cols=50></textarea></left></p>
</BODY>
</HTML>
THANKS!!!!
Randy