View Full Version : Refreshing "OnChange" Event Handler

08-23-2008, 09:12 PM
This is my first posting here and it seems to be a popular and knowledgeable message board.
I wrote a unit conversion program about 10 years ago and have updated it so that the dropdown menu (feet, inches, meters, yards, etc) has an event handler that starts the conversion process without the need to click a "calculate" button. It's located here: http://www.1728.com/convert9.htm

So, for example, if you want to convert 100 feet, you type in 100, click on "feet" and then all the conversions are calculated. If your next conversion is anything but feet, it will initiate conversions just fine. However, if you want to convert 90 feet, the event handler does nothing. I could add an auxilliary calculate button but is there a neater way to update the event handler so that clicking feet again will initiate the event?

08-24-2008, 12:15 AM
Try using an on change on both the text box and your select that way it will update if the value in the text box and if they want it in something else then it will update to that once they change the type of mesurement

08-24-2008, 02:01 AM
That seems to have worked. I'll keep the changes offline for the moment but thanks very much for the help. :thumbsup: