Jump to content

need some help with javascript


SLy CaT
 Share

6 posts in this topic

Recommended Posts

<script language="javascript">
<!---
diecutting=2;
function calculate(){
if (document.form.diecuttingcheck.checked)
	{var diecuttingmultiple=1}
	else
	{var diecuttingmultiple=0}
var total=(diecutting * diecuttingmultiple); 
document.writeln(total);
}
-->
</script>
<form name="form">
<input type="checkbox" name="diecuttingcheck" onClick="calculate();">
</form>

 

for some reason, in firefox, it hangs when its outputting the total. there must be something wrong i'm doing... though, not sure what it is =\ anyone see anything wrong?

 

i'm kind of new to javascript. i hardly used it before. i have more experience with php than javascript U_U;;

Link to comment
Share on other sites

=\ works in safari, opera, IE, but still seems to attempt to load something after executing the script in firefox (stops halfway).. both mac and windows.

 

so... that why i thought somethigns wrong. you were using firefox kday?

Link to comment
Share on other sites

  • 1 month later...
 Share

×
×
  • Create New...