Friday, March 16, 2012

Massive Data Input

I'm creating an application that allows a user to enter multiple items
that correspond to a single collection. The idea is that they enter the
product in the textbox, hit submit, repeat...
Currently they have to manually move the cursor back to the textbox to
continue inputting data. Since hitting the enter button will trigger an
event handler I was curious as to how to go about defaulting the cursor
position to being in the textbox at postback. Any suggestions?"Will Lastname" <wh00ph@.brinkster.net> wrote in
news:1126652729.550198.298080@.o13g2000cwo.googlegroups.com:

> I'm creating an application that allows a user to enter multiple items
> that correspond to a single collection. The idea is that they enter the
> product in the textbox, hit submit, repeat...
> Currently they have to manually move the cursor back to the textbox to
> continue inputting data. Since hitting the enter button will trigger an
> event handler I was curious as to how to go about defaulting the cursor
> position to being in the textbox at postback. Any suggestions?
How about asking the user to use Tab?
You should be able to tab through the fields on a Web Form.
Otherwise see if you can write some custom javascript to catch the enter
button...
Here is more info:
http://www.allasp.net/enterkey.aspx
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Newmarket Volvo Sucks! http://newmarketvolvo.tripod.com
I had simular issues with data entry personal in my aspx aps.
Depending on how much data has to be entered you can re-arrange key
events:
Here is a script thaqt allows them to use there enter key...
<form id="Form1" onkeydown="if(event.keyCode==13)event.keyCode=9"
method="post" runat="server">
Hitting the Enter key already works. I am wanting to know how to
default the cursor into the textbox of my choosing.
Thanks for the replies! I've got a few interesting bookmarks for later
reference because of it.

0 comments:

Post a Comment