Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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
 
Old November 30th, 2004, 08:27 AM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default client side time calculation(Please i need help)

hi
i'm facing a problem with the client side time calculation.
i must calculate two different time hours and minutes to get the total time
for example from 12:00 till 15:00 the result must be 3:00
how can i integrate a javascript function that make this job in my asp.net application
NB:
the from must be runat server "runat = server"

thanks

Georges M. Kaddoum

Georges M. Kaddoum
__________________
<GMK>
 
Old November 30th, 2004, 10:36 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you further define your question? Are you trying to make this code run on the client or the server? There are numerous methods for doing time math on the server, but not so many on the client.
 
Old November 30th, 2004, 12:39 PM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

WELL OK
I HAVE 2 FIELDS WHICH ARE "FROM TIME" AND "TO TIME" I WANT TO CALCULATE THE TOTAL TIME WHICH IS THE DIFFERENCE BETWEEN THE "TO TIME" AND THE "FROM TIME" AS CLIENT SIDE. WHICH MEANS WHENEVER THE USER FILL THE 2 TEXTBOXES IN THE THIRD TEXTBOX WHICH IS THE "TOTAL TIME" WOULD BE DISPLAYED AUTOMATICALY.
IS THERE ANY WAY TO DO SO?
THE RESULT OF THE CALCULATION MUST BE IN A TIME FORMAT.

THANKS

Georges M. Kaddoum
 
Old November 30th, 2004, 09:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

a simple google reveals :

http://javascript.internet.com/calcu...ifference.html
 
Old December 3rd, 2004, 04:54 AM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for this link it was so interesting but i'm still facing a problem becasue as you know i'm working on an ASP.NET application the textboxes are "runat = server" controls with those controls the javascript function is giving me an error which is:
"textbox1 is null or not an object"
i'm trying to get the time or date value from textbox1.
so is there any additional or any other code that might work with asp.net server control textboxes?
thanks

Georges M. Kaddoum





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Converting Client-side to Server-side Code kwilliams ASP.NET 2.0 Professional 1 November 21st, 2007 05:25 PM
Firing server side events at client side codes mehdi62b ASP.NET 1.0 and 1.1 Basics 6 May 18th, 2005 09:11 AM
CLIENT SIDE TIME CALCULATION IN ASP.NET gmk51080 Javascript How-To 1 December 1st, 2004 01:29 AM
client side time calculation in asp.net gmk51080 Javascript 0 November 30th, 2004 04:07 AM
sharing a server-side variable with client-side pigtail Javascript How-To 6 November 4th, 2004 02:01 AM





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