Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 27th, 2003, 10:23 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default real time calculations

i am wondering how i can have a box, and have the calculations a person may be doing expressed in really time, so no submit button is required or anything like that.

i have seen it down before but haven't been able to find any instructions on how to write it myself.

any feed back would be appreciated, thanks in advance.
  #2 (permalink)  
Old June 28th, 2003, 07:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

There are plenty of events that you can use to trigger the calculation such as onFocus, onChange etc.
  #3 (permalink)  
Old June 28th, 2003, 08:30 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your help, i dont know y i didnt think of that myself, but i have one more question...

http://www.edmunds.com/new/2003/isuz...enav..6.Isuzu*

at that page, it does the calculations in real time, but if u look toward the bottom, the results are displayed in a sort of image, any idea how this could be done?
  #4 (permalink)  
Old June 29th, 2003, 02:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

Looking at the code, it is not an image, but stored in a div, so i guess that they are using innerHTML to access it. If you wanted to show it as an image, you;ve just have to build 0-9 as seperate images with a decimal point and then for 123.45 you would have :

<img src="one.gif"><img src="two.gif"><img src="three.gif"><img src="decimalPoint.gif"><img src="four.gif"><img src="five.gif">

If you name all the images, you'll be able to do some changes very quickly to them as standard rollovers.
  #5 (permalink)  
Old June 29th, 2003, 07:15 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey thanks for your help. i did it using div and innerhtml, and it worked out great. thanks again, ur a big help.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Real time data from network Nuwang .NET Framework 2.0 1 May 13th, 2008 04:34 PM
time in sql server is not real time hertendreef SQL Server 2005 6 April 19th, 2007 07:07 AM
time calculations lizhaskin Access 1 November 10th, 2005 08:48 AM
Real Time Calculations on Form losartan Access 10 February 10th, 2005 11:47 AM
Run Time Calculations angel_xpmx Classic ASP Databases 2 November 27th, 2004 05:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.