![]() |
ok this is where this belongs.
need some help getting this to work online, might be the firewall of server preventing this from working.
still cant get it to accept multiplycation and division, any sugestions. <!-- JavaScript calculator --> <HTML> <HEAD> <TITLE>K98Calculator</TITLE> <SCRIPT LANGUAGE="JavaScript"> function CalculateSum(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A + B; } function ClearForm(form) { form.input_A.value = ""; form.input_B.value = ""; form.Answer.value = ""; } function SubtractSum(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A - B; } function SubtractSum(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A x B; } // end of JavaScript functions --> </SCRIPT> </HEAD> <BODY> <P><FONT SIZE="+2">MAUSER CALCULATOR</FONT></P> <FORM NAME="Calculator" METHOD="post"> <P>Enter a number: <INPUT TYPE=TEXT NAME="input_A" SIZE=40></P> <P>Enter a number: <INPUT TYPE=TEXT NAME="input_B" SIZE=40></P> <P><INPUT TYPE="button" VALUE="Add Numbers" name="AddButton" onClick="CalculateSum(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Subtract Numbers" name="SubtractButton" onClick="SubtractSum(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Multiply Numbers" name="MultiplyButton" onClick="MultiplySum(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Clear Fields" name="ClearButton" onClick="ClearForm(this.form)"></P> <P>Answer = <INPUT TYPE=TEXT NAME="Answer" SIZE=45></P> </FORM> </BODY> </HTML> |
Check THIS out please ...
|
firewall shouldn't be blocking that, since it runs on the client side.
if there isn't any errors, do you have javascript enabled in your browser? |
its supposed to be enabled but aint shure, still getting used to this OS since i updated it just the other day to XP SP2.
where do i check this? |
Code below works
PHP Code:
|
cool, still cant find the enable java on my browser
|
What're you using? IE 6? IE7? FF?
|
im using version 6. IE
|
Tools - Internet Options - Safty - Adapt levels and at the bottom of the list. You need to read behind the lines here as I have my Windows in Swedish.
|
yup its enabled
|
All times are GMT -5. The time now is 08:52 AM. |
Powered by vBulletin®