answersLogoWhite

0

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" />

<title>Untitled Document</title>

<link href="lightbox-styles.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript">

function currencyFormat(fld, milSep, decSep, e) {

var sep = 0;

var key = '';

var i = j = 0;

var len = len2 = 0;

var strCheck = '0123456789';

var aux = aux2 = '';

var whichCode = (window.Event) ? e.which : e.keyCode;

if (whichCode 3) {

aux2 += milSep;

j = 0;

}

aux2 += aux.charAt(i);

j++;

}

fld.value = '';

len2 = aux2.length;

for (i = len2 - 1; i >= 0; i--)

fld.value += aux2.charAt(i);

fld.value += decSep + aux.substr(len - 2, len);

}

return false;

}

function deleteChar(Input)

{

Input.value = Input.value.substring(0, Input.value.length - 1);

}

function validate()

{

var n=document.Calc.Input.value; //Get the value of textbox into variable

if (n<0.1 n >10) {

alert("Please enter a value in the range of 0.1 to 10.0 ml/sec");

document.Calc.Input.value='';

}

else {

document.getElementById('displ').value = document.getElementById('junk').value;

document.getElementById('light1').style.display='none';

document.Calc.Input.value='';

document.getElementById('fade1').style.display='none';

}

}

</script>

</head>

<body>

<p><a href="javascript:void(0)" onclick = "document.getElementById('light1').style.display='block';document.getElementById('fade1').style.display='block';document.Calc.Input.value='';"><input type="text" id="displ" readonly="readonly" /></a></p>

<div id="light1" class="white_content">

<form name="Calc">

<div>

<input type="text" name="Input" id="junk" size="16" onkeypress="return(currencyFormat(this,',','.',event))" />

<input type="button" id="backspace" value="Backspace" onclick="deleteChar(this.form.Input)" />

</div>

<div class="first">

<input type="button" name="one" VALUE=" 1 " Onclick="Calc.Input.value += '1'">

<input type="button" name="two" VALUE=" 2 " Onclick="Calc.Input.value += '2'">

<input type="button" name="three" VALUE=" 3 " Onclick="Calc.Input.value += '3'">

</div>

<div class="second">

<input type="button" name="four" VALUE=" 4 " Onclick="Calc.Input.value += '4'">

<input type="button" name="five" VALUE=" 5 " Onclick="Calc.Input.value += '5'">

<input type="button" name="six" VALUE=" 6 " Onclick="Calc.Input.value += '6'">

</div>

<div class="third">

<input type="button" name="seven" VALUE=" 7 " Onclick="Calc.Input.value += '7'">

<input type="button" name="eight" VALUE=" 8 " Onclick="Calc.Input.value += '8'">

<input type="button" name="nine" VALUE=" 9 " Onclick="Calc.Input.value += '9'">

</div>

<div class="fourth">

<input type="reset" name="cancel" VALUE="Cancel" Onclick="Calc.Input.value += ''">

<input type="button" name="zero" VALUE=" 0 " Onclick="Calc.Input.value += '0'">

<input type="button" name="enter" VALUE="Enter" Onclick="validate();">

</div>

</form><a href = "javascript:void(0)" onclick = "document.getElementById('light1').style.display='none';document.getElementById('fade1').style.display='none'">Close</a></div>

<div id="fade1" class="black_overlay"></div>

</body>

<!-- honey -->

</HTML>

User Avatar

Wiki User

13y ago

What else can I help you with?