neozbiljno
01-05-2008, 06:04 PM
Hello!
I must appologue in a start of this writing for my english wroten text, its not the best edition that you have been seen, but please have patience for text.
I am having some problems with my own script that am writing for mechanical ingeniring if anybody see a problem in script could you help???!!!
I am doing some script about temperature and materials, how are materials related with changing temperature.
It should be simple scripte where you put in start lenght of some material and start temperature and temperature to be heated material.
materials are choising with radiobutton and every material have unique number.
now in here is the problem script is not worjing and it dont wont to write result in inputbox.
can anybody help me please!!! :confused::confused::confused:
here is script:
<html>
<head>
<title>Iz knjige</title>
<body background="wood.png">
<script language="JavaScript">
var K=273;
var m;
var Lz, Tz, Tk;
function izracun(Lk) {
Lz=parseFloat(document.vnos.this.value.Lz);
Tz=parseFloat(document.vnos.this.value.Tz);
Tk=parseFloat(document.vnos.this.value.Tk);
if(form.material[0].checked){
m=0.0000238;
}
if(form.material[1].checked){
m=0.0000165;
}
if(form.material[2].checked){
m=0.0000165;
}
Lk=(Lz*(1+m*((K+Tk)-(K+Tz))));
document.write(Lk)
}
</script>
</head>
<body>
Zacetna dolzina: <input type="text" name="Lz" onBlur="Lz=parseFloat(this.value)" size="7" value=""> [mm]<BR>
Zacetna temperatura: <input type="text" name="Tz" onBlur="Tz=parseFloat(this.value)" size="7" value="20"> [°C]<BR>
Koncna temperatura: <input type="text" name="Tk" onBlur="Tk=parseFloat(this.value)" size="7" value=""> [°C]<BR>
Material:<br>
<input type="radio" name="material">aluminij (Al)<BR>
<input type="radio" name="material">baker (Cu)<BR>
<input type="radio" name="material">cink (Zn)<BR>
</table></center><P><center><input type="button" name="izracun" value="Izracun" onClick="izracun(Lk.value*1.0, material)"><br><br>
<B>Koncna dolzina=<INPUT type="text" name="Lk", size=5>[mm]</B><BR>
</body>
</html>
I must appologue in a start of this writing for my english wroten text, its not the best edition that you have been seen, but please have patience for text.
I am having some problems with my own script that am writing for mechanical ingeniring if anybody see a problem in script could you help???!!!
I am doing some script about temperature and materials, how are materials related with changing temperature.
It should be simple scripte where you put in start lenght of some material and start temperature and temperature to be heated material.
materials are choising with radiobutton and every material have unique number.
now in here is the problem script is not worjing and it dont wont to write result in inputbox.
can anybody help me please!!! :confused::confused::confused:
here is script:
<html>
<head>
<title>Iz knjige</title>
<body background="wood.png">
<script language="JavaScript">
var K=273;
var m;
var Lz, Tz, Tk;
function izracun(Lk) {
Lz=parseFloat(document.vnos.this.value.Lz);
Tz=parseFloat(document.vnos.this.value.Tz);
Tk=parseFloat(document.vnos.this.value.Tk);
if(form.material[0].checked){
m=0.0000238;
}
if(form.material[1].checked){
m=0.0000165;
}
if(form.material[2].checked){
m=0.0000165;
}
Lk=(Lz*(1+m*((K+Tk)-(K+Tz))));
document.write(Lk)
}
</script>
</head>
<body>
Zacetna dolzina: <input type="text" name="Lz" onBlur="Lz=parseFloat(this.value)" size="7" value=""> [mm]<BR>
Zacetna temperatura: <input type="text" name="Tz" onBlur="Tz=parseFloat(this.value)" size="7" value="20"> [°C]<BR>
Koncna temperatura: <input type="text" name="Tk" onBlur="Tk=parseFloat(this.value)" size="7" value=""> [°C]<BR>
Material:<br>
<input type="radio" name="material">aluminij (Al)<BR>
<input type="radio" name="material">baker (Cu)<BR>
<input type="radio" name="material">cink (Zn)<BR>
</table></center><P><center><input type="button" name="izracun" value="Izracun" onClick="izracun(Lk.value*1.0, material)"><br><br>
<B>Koncna dolzina=<INPUT type="text" name="Lk", size=5>[mm]</B><BR>
</body>
</html>