| SitePoint Sponsor |


Programming Group Advisor
Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
Car is to Carpet as Java is to JavaScript





OK, I figured out where to put your 2-place code. One final thing -- I should be able to enter a number in the ratio box without adding any numbers in the Spur and Pinion boxes at top. But the code won't execute. Any reason why it won't read the top form?


Programming Group Advisor
Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
Car is to Carpet as Java is to JavaScript





Zipped HTML. Thanks for your time!
I won't at this station tomorrow. I'll be back in on Friday.


The code works for me in Google Chrome when I don't enter the gears and just type in my own ratio number.
Let's see how it goes in Firefox. That seems to be okay too, although Firebug does provide this warning:
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
Line 144
That divide.onclick should instead use getElementById
How about in Internet Explorer? Ahh, that errors saying that divide is not defined.
Now you know of what should be looked in to.
Programming Group Advisor
Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
Car is to Carpet as Java is to JavaScript





I am using this on the iPhone only, so it only needs to work in Safari. If there's no workaround, then we can consider this finished. The people will be very happy to have it as is!
I really appreciate all your hard work. You are truly a Javascript Guru!


The Windows version of the Safari web browser doesn't seem to have any trouble either. I'll see if I can find an iphone simulator. Ahh, here's one.
iBBDemo2 - Cross Platform iPad and iPhone Simulator
That seems to work too, with your test code that I have up at:
Gear Ratio
You're very welcome. Thanks.
Programming Group Advisor
Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
Car is to Carpet as Java is to JavaScript





I just tried it in Safari on the Mac. Typing a number in either of the top boxes generates "not valid."
Strange!
Bookmarks