468,765 Members | 946 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Tab out vs. Mouse click

Hi All,

I have created an ASP.NET page that basically consists of a table having
text boxes in all cells. The table is created using client side java script.
There are some calculations being done when user changes text in any text
box and moves to the next text box. This is done in the Text Changed event
in java script.
The problem that I am facing is that, if the user moves from one text box to
another using tab key, the performance is fine. However, if the user moves
from one text box to another using mouse click, the performance is lot
slower. It takes about 3-4 seconds for the cursor to reappear on the second
text box. Tab takes less than 1 second.

Can anybody throw some light on why this might be happening?

TIA
Prateek
Nov 19 '05 #1
4 2376
Maybe if you provided code?

Are you sure anything's happening when they are simply tabbing? maybe none
of your client-side code is running? In other words maybe the problem is
really with the tabbing as opposed to the mouse (that's what I frst thought
anyways)..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Prateek" <pr******@grapecity.com> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have created an ASP.NET page that basically consists of a table having
text boxes in all cells. The table is created using client side java script. There are some calculations being done when user changes text in any text
box and moves to the next text box. This is done in the Text Changed event
in java script.
The problem that I am facing is that, if the user moves from one text box to another using tab key, the performance is fine. However, if the user moves
from one text box to another using mouse click, the performance is lot
slower. It takes about 3-4 seconds for the cursor to reappear on the second text box. Tab takes less than 1 second.

Can anybody throw some light on why this might be happening?

TIA
Prateek

Nov 19 '05 #2
Hi Prateek,

Without any example code this is a tough call. If you are using VS.Net or
running IE with debugging enabled I recommend you use the debugger; line.
This will halt execution of your javascript and let you step through it just
like you do your ASP.Net code behind. Then step through your code after a
tab out and after a mouse click and see what is going on. My guess is that
you are firing some javascript on both the Text Changed event and the
onclick event that is causing a different execution path to occur leading to
your bottleneck. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Prateek" <pr******@grapecity.com> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have created an ASP.NET page that basically consists of a table having
text boxes in all cells. The table is created using client side java script. There are some calculations being done when user changes text in any text
box and moves to the next text box. This is done in the Text Changed event
in java script.
The problem that I am facing is that, if the user moves from one text box to another using tab key, the performance is fine. However, if the user moves
from one text box to another using mouse click, the performance is lot
slower. It takes about 3-4 seconds for the cursor to reappear on the second text box. Tab takes less than 1 second.

Can anybody throw some light on why this might be happening?

TIA
Prateek

Nov 19 '05 #3
many thanks for your insights Ken and Karl..
heres some more information:
- Only OnChange event is being used. no server side code is executed.. only
javascript
- this event fires only once for both tab and mouse click
- it takes around 270-350 milli seconds for the code in OnChange event to
execute for both mouse and tab. no other code is executed.
- however, for the user, it seems that tab takes 1 sec and mouse click 3-4
seconds. whats causing this extra time? I can submit the code but actually
there isn't anything else in the code except an onchange event handler.
- there are three frames on the page.. each frame has a table. each table
has about 100 text boxes.
it seems that the system itself is executing something thats taking this
extra time..
any suggestions?

thanks for any inputs that you can give!

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
Hi Prateek,

Without any example code this is a tough call. If you are using VS.Net or
running IE with debugging enabled I recommend you use the debugger; line.
This will halt execution of your javascript and let you step through it
just
like you do your ASP.Net code behind. Then step through your code after a
tab out and after a mouse click and see what is going on. My guess is
that
you are firing some javascript on both the Text Changed event and the
onclick event that is causing a different execution path to occur leading
to
your bottleneck. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Prateek" <pr******@grapecity.com> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have created an ASP.NET page that basically consists of a table having
text boxes in all cells. The table is created using client side java

script.
There are some calculations being done when user changes text in any text
box and moves to the next text box. This is done in the Text Changed
event
in java script.
The problem that I am facing is that, if the user moves from one text box

to
another using tab key, the performance is fine. However, if the user
moves
from one text box to another using mouse click, the performance is lot
slower. It takes about 3-4 seconds for the cursor to reappear on the

second
text box. Tab takes less than 1 second.

Can anybody throw some light on why this might be happening?

TIA
Prateek


Nov 19 '05 #4
Prateek:
I really don't have any idea. You might try cancelling the event after your
done processing. It might have undesirable side effects but it's really the
only thing I can suggest trying to figure it out:
http://www.webdevelopersjournal.com/...jsevents2.html
(different in IE and FireFox)

Perhaps the complexity of the frames/tables/boxes is what the problem
is...you could also simply dumb down the page to the core basics and if
that's fast, you can add functionality one at a time until you hit
something...poor man's debugging :(

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Prateek" <pr******@grapecity.com> wrote in message
news:eU**************@TK2MSFTNGP10.phx.gbl...
many thanks for your insights Ken and Karl..
heres some more information:
- Only OnChange event is being used. no server side code is executed.. only javascript
- this event fires only once for both tab and mouse click
- it takes around 270-350 milli seconds for the code in OnChange event to
execute for both mouse and tab. no other code is executed.
- however, for the user, it seems that tab takes 1 sec and mouse click 3-4
seconds. whats causing this extra time? I can submit the code but actually
there isn't anything else in the code except an onchange event handler.
- there are three frames on the page.. each frame has a table. each table
has about 100 text boxes.
it seems that the system itself is executing something thats taking this
extra time..
any suggestions?

thanks for any inputs that you can give!

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
Hi Prateek,

Without any example code this is a tough call. If you are using VS.Net or running IE with debugging enabled I recommend you use the debugger; line. This will halt execution of your javascript and let you step through it
just
like you do your ASP.Net code behind. Then step through your code after a tab out and after a mouse click and see what is going on. My guess is
that
you are firing some javascript on both the Text Changed event and the
onclick event that is causing a different execution path to occur leading to
your bottleneck. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Prateek" <pr******@grapecity.com> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have created an ASP.NET page that basically consists of a table having text boxes in all cells. The table is created using client side java

script.
There are some calculations being done when user changes text in any text box and moves to the next text box. This is done in the Text Changed
event
in java script.
The problem that I am facing is that, if the user moves from one text
box to
another using tab key, the performance is fine. However, if the user
moves
from one text box to another using mouse click, the performance is lot
slower. It takes about 3-4 seconds for the cursor to reappear on the

second
text box. Tab takes less than 1 second.

Can anybody throw some light on why this might be happening?

TIA
Prateek



Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by punkin | last post: by
3 posts views Thread by mitsura | last post: by
25 posts views Thread by Romanise | last post: by
2 posts views Thread by scott_gui | last post: by
19 posts views Thread by wmanzo | last post: by
3 posts views Thread by Morten Snedker | last post: by
5 posts views Thread by Adeel | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.