michael_nrw
Feb 9th 2005, 4:10 pm
Hi guys,
I have the following problem: If i check a checkbox, an onclick-event jumps into a javascript function, which needs 2-3 seconds before finishing a complex calculation. In this time-period i want to change the cursor style in the status 'wait' (sandbox). After calculation is finished, i want the cursor back in his default status (arrow). I tried many things, but nothing works, anyone can help?
thank you in advance, michael
for example a little javascript-progi:
<html><head><title>Test</title>
<script type="text/javascript">
function calc() {
var dummy = 0;
for (var i=0; i<1000000;i++) {
for (var z=0; i<1000000;i++) {
dummy = dummy + z + i;
}
}
}
</script>
</head><body>
<form name="Formular" action="">
<input type="checkbox" name="Test" value="Testvalue" onClick="calc()"> Only a test
</form>
</body></html>
I have the following problem: If i check a checkbox, an onclick-event jumps into a javascript function, which needs 2-3 seconds before finishing a complex calculation. In this time-period i want to change the cursor style in the status 'wait' (sandbox). After calculation is finished, i want the cursor back in his default status (arrow). I tried many things, but nothing works, anyone can help?
thank you in advance, michael
for example a little javascript-progi:
<html><head><title>Test</title>
<script type="text/javascript">
function calc() {
var dummy = 0;
for (var i=0; i<1000000;i++) {
for (var z=0; i<1000000;i++) {
dummy = dummy + z + i;
}
}
}
</script>
</head><body>
<form name="Formular" action="">
<input type="checkbox" name="Test" value="Testvalue" onClick="calc()"> Only a test
</form>
</body></html>