473,321 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Textbox calculation

23
Hi ,

i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format.

for ex : a textbox has to accept only time format as 23:00:00 .

Now in textbox4 i need to calculate average of the above 3 textbox's i.e average of 3 textbox's time format whihc is in HH:MM:SS format.

once i comeout of 3rd textbox the average of above 3 textbox's has 2 display in 4th textbox.

Plz provide me code or javascript.......

Plz help me ........

Rgds,

Nusrath.
Nov 17 '07 #1
10 2848
acoder
16,027 Expert Mod 8TB
Use the split method to split the string value from the textbox using ":" as the delimiter.

Use the resulting array to calculate the average.
Nov 17 '07 #2
nussu
23
Hi ,

i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format.

for ex : a textbox has to accept only time format as 23:00:00 .

Now in textbox4 i need to calculate average of the above 3 textbox's i.e average of 3 textbox's time format whihc is in HH:MM:SS format.

once i comeout of 3rd textbox the average of above 3 textbox's has 2 display in 4th textbox.

In 4th textbox the average also has to fisplay in time format only i.e in HH:MM:SS.

Plz provide me code or javascript.......

Plz help me ........




Rgds,

Nussu.
Nov 18 '07 #3
Markus
6,050 Expert 4TB
You've asked this 3times in as less days.

The reason your question isn't getting answered is because it is clear you lack any knowlege in coding with javascript.

We, at tsDN, are not here to provide you with complete code; we are here to assist you and give you a push(in your case a kick) in the right direction.

Please go read some tutorials, many can be found on the big interwebs, and try it yourself.

mark.
Nov 18 '07 #4
acoder
16,027 Expert Mod 8TB
Threads merged. Please do not double/triple post especially after receiving a response.
Nov 18 '07 #5
nussu
23
Hi ,

I need a javascript....... or........... code.

i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format.

for ex : a textbox has to accept only time format as 23:00:00 .

Now in textbox4 i need to calculate average of the above 3 textbox's i.e average of 3 textbox's time format whihc is in HH:MM:SS format.

once i comeout of 3rd textbox the average of above 3 textbox's has 2 display in 4th textbox.

In 4th textbox the average also has to display in time format only i.e in HH:MM:SS.

Plz provide me code or javascript.......

Plz help me ........




Rgds,

Nusrath.
Nov 19 '07 #6
gits
5,390 Expert Mod 4TB
threads merged again ... DON'T multipost your question on the same topic ... to bump up your question you may reply to your own post ... and wait for answers ... did you made an attempt for yourself already? please post the code you have so far ... or ask a specific question regarding the response that you already have with the split-method ...

regards
gits
Nov 19 '07 #7
nussu
23
Ya i am new to .net and javascript.....
I m fresher.......
Nov 19 '07 #8
acoder
16,027 Expert Mod 8TB
You've got to make an attempt yourself first and we'll help you with any problems that you might have with your code.

Show us what code you have so far.

Also, see post #2 in this thread for some ideas on how to go about solving the problem.
Nov 19 '07 #9
nussu
23
Hi,

I have time format in HH:MM:SS in a textbox , I need to get first two digits from this time format .

Plz help using javascript.

Regards,

Nussu
Dec 6 '07 #10
acoder
16,027 Expert Mod 8TB
Assuming the time is validated and in the right format:
Expand|Select|Wrap|Line Numbers
  1. var time = textbox.value.split(":");
  2. hour = time[0];
PS: threads merged.
Dec 6 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: John Sheppard | last post by:
Hi there Does anyone know how to fill a bound textbox automaticlly. In an unbound textbox I would put in the control source =Sum(price, tax) (or some such function) and access updates it...
2
by: DotNetJunkie | last post by:
Hi NG, I want to pass a very long string to a multilined TextBox. After doing this, I want to resize the TextBox vertically, so that the text fits into the TextBox exactly. Any ideas? I need it...
14
by: Adam Clauss | last post by:
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText. As my task is fairly lengthy,...
6
by: Agnes | last post by:
For i = 1 to 5000 Me.txtCounter.text = i 'As I found the textbox didn't update itself, I add (Me.txtCounter.update) '.... some calculation statment end for Me.txtcounter.update sometimes work...
0
by: petri | last post by:
Could any one say me,how to create a row dynamically with a textbox and comobox in a button click in a grid.Also i need to create the textbox and combobox with id as i need to do calculation...
10
by: garyusenet | last post by:
I have a multiline textbox. The size of the text box should be 75 characters wide, and 5 lines in height like this: - <---75 characters--> <---75 characters--> <---75 characters--> <---75...
10
by: hacorbin | last post by:
I have a VB.NET program I am creating that sums 7 textboxes and displays their total in a total textbox. code: Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As...
1
by: danielgoss | last post by:
Hi I have a report that has loads of textboxes that calculate things based on the value on another textbox in the report. I have put a hidden textbox on my report that gets its value from an...
2
by: nussu | last post by:
Hi, A textbox has to accept only numeric values by using validation controls in .net 2.0 Plz help me ... Regards, Nussu
7
by: vinay2110 | last post by:
i m new to .net programing and dont know how to apply mathematic calculation on the text box. i has the idea to do this thing using auto post back but i dont know what is the exact syntax which will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.