View Single Post
Old 10-21-2003, 05:14 PM   #22 (permalink)
PhilC
Crap Bag
 
Join Date: 10-12-03
Posts: 1,727
iTrader: 0 / 0%
Latest Blog:
None

PhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crapPhilC is web crap
Quote:
Originally Posted by Culland
Well I tested and it works, which is likely because writing the DIV causes a server query. See my code above, where I implimented the idea.
It doesn't cause a server query. This is the page in the browser:-

[code:1:351b2fd9a9]<html>
<head>
<script language="javascript">
function dostuff(){
x = document.getElementById("mainblock");
x.innerHTML = "Testing Two";

}
</script>
</head>
<body>
<div id="mainblock">
Testing One
</div>
<br><br>
<input type="button" onClick="dostuff()" value="Push">
</body>
</html>
[/code:1:351b2fd9a9]
Clicking the button merely writes a different phrase into the div. It doesn't go anywhere near the server.
PhilC is offline   Reply With Quote