Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<script=javascript>
function calculateOxy(obj){
var i, index;
for(i=0;i<document.forms[0].length;i++){
if(document.forms[0].elements[i ].name==obj.name)
index=i;
}
var tempfactor;
tempfactor = 0.0035 * document.forms[0].elements[index-2].value^2;
var tempBfactor;
tempBfactor = -.3369 * document.forms[0].elements[index-2].value;
var DO;
DO = document.forms[0].elements[index].value;
var Denom;
Denom = 14.407 + tempfactor + tempBfactor;
var calculatedValue;
calculatedValue = (AvgDO/Denom) * 100;
document.forms[0].elements[index+1].value=calculatedValue;
}
</script>
...
document.Form1.txtmyText.value
...
function calculateOxyA(obj){
if(document.frmCDE.txtWaterTemp.value*1 < 0.01){
alert('Make a note in the comments that no water temperature reported for this sample');
document.frmCDE.txtWaterTemp.value = -1
}
if(document.frmCDE.txtAvgDO.value*1 < 0.01){
var y = document.frmCDE.txtRep1.value*1
y = y.toDec(2);
document.frmCDE.txtAvgDO.value = y*1;
}
else{
var z = (0.5*((document.frmCDE.txtRep1.value*1)+(document.frmCDE.txtRep2.value*1)));
z = z.toDec(2);
document.frmCDE.txtAvgDO.value = z*1;
}
var AvgDO = document.frmCDE.txtAvgDO.value*1
var T = document.frmCDE.txtWaterTemp.value*1
T = T*1 + 273.15
var x = (157570.1/T)*1
var y = - (66423080/(T*T))*1
var z = (12438000000/(T*T*T))*1
var zz = - (862194900000/(T*T*T*T))*1
var sal = document.frmCDE.txtSalinity.value*1
var sala = 0.017674 - (10.754/T)*1
var salb = (2140.7/(T*T))*1
var salc = sal*1*((sala*1)+(salb*1))
var zzz = Math.exp(-139.34411 + x*1 + y*1 + z*1 + zz*1- salc*1);
var y = (AvgDO*1/zzz*1)*100
y = y.toDec(2); [Note: y.toFixed(2); may be equivalent]
document.frmCDE.txtSat.value = y*1;
}
<Script LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function chng(){
if (frmWS.r2.checked){
frmWS.txtA.value="0";
frmWS.r1.checked=false;
frmWS.strURL.value = "Groupsdata.aspx?ChartID=1"
}
else{
frmWS.txtA.value="1";
frmWS.r2.checked=false;
frmWS.strURL.value = "WSDataMap.aspx?ChartID=1"
}
}
-->
</script>
<html>
...
...option buttons...
<p align="center"><i><Font Size="4" color="navy"><input type=radio id="r1" runat="server" onclick="Javascript:chng();">Search by Map
<input type=radio id="r2" runat="server" onclick="Javascript:chng();">Search by DataGrid</Font></i></p>
...
...hiddent input textboxes...
<input type="Text" id="txtA" runat="server" Value="0">
<input type="Text" id="strURL" runat="server" Value="Groupsdata.aspx?ChartID=1">
...
...
</html>
function sF(intF){
var url = frmWS.strURL.value;
var index = frmWS.txtV.value;
url += index;
navigate(url + '&WID=' +intF);
}
function getStr(str, strC){
var s="";
var r="";
var opt;
var el;
for (var i=0;i<document.Form1.lstCon.length;i++) {
if(document.Form1.lstCon.options[i].selected){
s+=document.Form1.lstCon.options[i].value+((i==document.Form1.lstCon.length-1)?"":",");
r+=document.Form1.lstCon.options[i].text+((i==document.Form1.lstCon.length-1)?"":",");
}
}
document.Form1.alloptions.value=s;
document.Form1.allNoptions.value=r;
document.Form1.dteTime.value = document.Form1.ddhr.options[document.Form1.ddhr.selectedIndex].text + ":" + document.Form1.ddmin.options[document.Form1.ddmin.selectedIndex].text;
if(document.Form1.radchem.checked==true){
el = "ChemDataEntry.aspx?mypage=8&filter=" + document.Form1.txtfilter.value + "&Description=" + str + "&GroupAbbrev=" + strC;
}
if(document.Form1.radbac.checked==true){
el = "BacDataEntry.aspx?mypage=8&filter=" + document.Form1.txtfilter.value + "&Description=" + str + "&GroupAbbrev=" + strC;
}
if(document.Form1.radbio.checked==true){
el = "BioDataEntry.aspx?mypage=8&filter=" + document.Form1.txtfilter.value + "&Description=" + str + "&GroupAbbrev=" + strC;
}
if(document.Form1.radparam.checked==true){
el = "SixParams.aspx?mypage=8&filter=" + document.Form1.txtfilter.value + "&Description=" + str + "&GroupAbbrev=" + strC;
}
navigate(el);
}