Dysan Posted January 1, 2008 Share Posted January 1, 2008 Hi, Using JavaScript how do you convert a Pounds and Ounces value, specified by user (e.g. 5.5¾) into grams? Quote Link to comment Share on other sites More sharing options...
AndyB Posted January 1, 2008 Share Posted January 1, 2008 Google broken? http://www.google.com/search?q=javascript+weight+converter+script&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a Quote Link to comment Share on other sites More sharing options...
Dysan Posted January 1, 2008 Author Share Posted January 1, 2008 How do I make one? Quote Link to comment Share on other sites More sharing options...
AndyB Posted January 1, 2008 Share Posted January 1, 2008 How do I make one? None of those does what you want????? Quote Link to comment Share on other sites More sharing options...
Dysan Posted January 1, 2008 Author Share Posted January 1, 2008 NO How do I make a converter that retrieves weights from a MySQL database, converts them to grams, and then keep displaying the pounds and ounces weight for 5 seconds, then the grams weight for five seconds? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 1, 2008 Share Posted January 1, 2008 retrieve the weight with MySQL/PHP and put the retrieved weight into your JavaScript variable. set-up a calculation to convert pounds/ounces to grams and then set-up a calculation to covert grams to pounds/ounces (or you could just store the original value "pound and ounces" in a variable; and get the variable - instead of converting back from grams). create a timing event with either setTime or setTimeout to switch the calculations, from one to the other, every five seconds. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.