crvoss
07-03-2003, 05:24 PM
I can't seem to get this to work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function stdCond() {
document.DensityInfo.DBTempUnits.options[0].selected = true;
}
// -->
</script>
<title>Page title</title>
</head>
<body>
<script language='javascript' type='text/javascript'>
function CheckEntry() {
document.DensityInfo.submit();
msg=document.DensityInfo.DBTemp.value + "\n" + document.DensityInfo.WBTemp.value
alert(msg);
location="Display.php";
}
</script>
<form method="post" action="FSStart.php" name="DensityInfo">
Drybulb Temperature:<input type="text" name="DBTemp" size="10" maxlength="15" value="">
Wetbulb Temperature:<input type="text" name="WBTemp" size="10" maxlength="15" value="">
<a class='btnbar' href="javascript:CheckEntry()">Next>></a>
</form>
</body>
</html>
-----------------------------
then I use this to examine the values:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
</head>
<body>
<?php
echo "Drybulb Temperature: $DBTemp";
echo "Wetbulb Temperature: $WBTemp";
?>
</body>
</html>
---------------------------------
The problem is that they are empty. If I place a submit button instead of a link in the first script everything works (but that is not what I am after). What am I doing wrong?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function stdCond() {
document.DensityInfo.DBTempUnits.options[0].selected = true;
}
// -->
</script>
<title>Page title</title>
</head>
<body>
<script language='javascript' type='text/javascript'>
function CheckEntry() {
document.DensityInfo.submit();
msg=document.DensityInfo.DBTemp.value + "\n" + document.DensityInfo.WBTemp.value
alert(msg);
location="Display.php";
}
</script>
<form method="post" action="FSStart.php" name="DensityInfo">
Drybulb Temperature:<input type="text" name="DBTemp" size="10" maxlength="15" value="">
Wetbulb Temperature:<input type="text" name="WBTemp" size="10" maxlength="15" value="">
<a class='btnbar' href="javascript:CheckEntry()">Next>></a>
</form>
</body>
</html>
-----------------------------
then I use this to examine the values:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
</head>
<body>
<?php
echo "Drybulb Temperature: $DBTemp";
echo "Wetbulb Temperature: $WBTemp";
?>
</body>
</html>
---------------------------------
The problem is that they are empty. If I place a submit button instead of a link in the first script everything works (but that is not what I am after). What am I doing wrong?