SLy CaT Posted August 12, 2006 Share Posted August 12, 2006 <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 https://www.insanelymac.com/forum/topic/24353-need-some-help-with-javascript/ Share on other sites More sharing options...
kday Posted August 12, 2006 Share Posted August 12, 2006 Works fine for me. Link to comment https://www.insanelymac.com/forum/topic/24353-need-some-help-with-javascript/#findComment-162133 Share on other sites More sharing options...
SLy CaT Posted August 12, 2006 Author Share Posted August 12, 2006 =\ 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 https://www.insanelymac.com/forum/topic/24353-need-some-help-with-javascript/#findComment-162141 Share on other sites More sharing options...
kday Posted August 12, 2006 Share Posted August 12, 2006 Not sure why. Works in both Win/Mac firefox here. Copied and pasted the code into a blank html document. Maybe try clearing your cache? Link to comment https://www.insanelymac.com/forum/topic/24353-need-some-help-with-javascript/#findComment-162144 Share on other sites More sharing options...
SLy CaT Posted August 12, 2006 Author Share Posted August 12, 2006 U_U so weird.. i now tried this on 3 different computers, cache cleared, and all the same result. Link to comment https://www.insanelymac.com/forum/topic/24353-need-some-help-with-javascript/#findComment-162157 Share on other sites More sharing options...
acidnine Posted September 26, 2006 Share Posted September 26, 2006 What version of firefox? you have <!--- and you're ending it with --> Link to comment https://www.insanelymac.com/forum/topic/24353-need-some-help-with-javascript/#findComment-196312 Share on other sites More sharing options...
Recommended Posts