Hello All,
here is my code:
<html>
<head>
<STYLE TYPE="text/css">
<!--
#text {position: absolute;
top: 100px;
left: 250;
width:169;
padding: 2px;
}
-->
</STYLE>
<script language=javascript>
function testing(number)
{
if(document.all)
{
var Staked = 12;
document.all.text.innerHTML = number*Staked;
}
else if(document.layers)
{
var Staked = document.frmMain.stake.value;
var id = 'text';
var x = document.layers[id];
var text2;
text2 = '<td class="a-10-dg-b-l-back">'+ number* Staked+'</td>';
x.document.open();
x.document.write(text2);
x.document.close();
}
}
function resizeBugfix()
{
if(document.layers)
{
var loadWidth
var loadHeight
loadWidth = 376;
loadHeight = 380;
innerWidth=loadWidth;
innerHeight= loadHeight;
}
else if(document.all)
{
window.resizeTo(376,500);
}
}
</script>
</head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body onload="resizeBugfix();" >
<form name="frmMain" action="default.asp"method="POST" >
<div>
<center>
<table Width="" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" class="a-9-w-b-c-dg">Document Testing</td>
</tr>
<tr>
<td class="a-10-w-b-r-lg" height="20">Number</td>
<td width="1"></td>
<td>
<input type="textbox" class="Stake" size ="6" maxlength="7" name="stake" onkeyup='testing(8);'
></input></td>
<td width ="169" ><div class="a-10-dg-b-l-back" ID="text">total result is:</div></td>
</tr>
</table>
</form>
</center>
</div>
</body>
really don't know why if you load the page at first time, the onkeyup ="testing()" seems doesn't work; only when you reload the page, it works fine. why???
thanks a lot
</html>
here is my code:
<html>
<head>
<STYLE TYPE="text/css">
<!--
#text {position: absolute;
top: 100px;
left: 250;
width:169;
padding: 2px;
}
-->
</STYLE>
<script language=javascript>
function testing(number)
{
if(document.all)
{
var Staked = 12;
document.all.text.innerHTML = number*Staked;
}
else if(document.layers)
{
var Staked = document.frmMain.stake.value;
var id = 'text';
var x = document.layers[id];
var text2;
text2 = '<td class="a-10-dg-b-l-back">'+ number* Staked+'</td>';
x.document.open();
x.document.write(text2);
x.document.close();
}
}
function resizeBugfix()
{
if(document.layers)
{
var loadWidth
var loadHeight
loadWidth = 376;
loadHeight = 380;
innerWidth=loadWidth;
innerHeight= loadHeight;
}
else if(document.all)
{
window.resizeTo(376,500);
}
}
</script>
</head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body onload="resizeBugfix();" >
<form name="frmMain" action="default.asp"method="POST" >
<div>
<center>
<table Width="" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" class="a-9-w-b-c-dg">Document Testing</td>
</tr>
<tr>
<td class="a-10-w-b-r-lg" height="20">Number</td>
<td width="1"></td>
<td>
<input type="textbox" class="Stake" size ="6" maxlength="7" name="stake" onkeyup='testing(8);'
></input></td>
<td width ="169" ><div class="a-10-dg-b-l-back" ID="text">total result is:</div></td>
</tr>
</table>
</form>
</center>
</div>
</body>
really don't know why if you load the page at first time, the onkeyup ="testing()" seems doesn't work; only when you reload the page, it works fine. why???
thanks a lot
</html>