HighDots Forums  

jumping to next field without javascript

alt.html alt.html


Discuss jumping to next field without javascript in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Koos
 
Posts: n/a

Default jumping to next field without javascript - 05-07-2004 , 03:18 AM






Hello everybody,

I have a PHP application with a lot of form fields. I would like to
automatically have the cursor (focus) jump to the next input element
once MAXLENGTH is reached. I found this:

http://www.htmlcodetutorial.com/form...msupp_162.html

but it's javascript. The app will be approached with several clients,
mozilla, ie, elinks and so far I managed to keep is javascript-free.

Can I do the jump without javascript, that is: in pure html (4)?

Thanks!

Reply With Quote
  #2  
Old   
Andrew Urquhart
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 07:08 AM






*Koos* wrote:
Quote:
Hello everybody,

I have a PHP application with a lot of form fields. I would like to
automatically have the cursor (focus) jump to the next input element
once MAXLENGTH is reached. I found this:

http://www.htmlcodetutorial.com/form...msupp_162.html

but it's javascript. The app will be approached with several clients,
mozilla, ie, elinks and so far I managed to keep is javascript-free.

Can I do the jump without javascript, that is: in pure html (4)?
I don't know how general the audience for your application will be, but
if it's for Joe Blogs/John Doe on the WWW he won't be expecting the user
interface to behave this way. I could imagine someone (quite
reasonably!) expecting the form to act like any other form they've used
before, typing away whilst looking at the keyboard and looking up to
find that they've filled in several form fields whilst writing a lot of
content in a single field.

How would they know what's happened, why train people to use your new
form system when people already know how to use the standard version? If
this was my application and content needed to be restricted in form
inputs I'd use maxlength on inputs where allowed but have warnings in
the labels associated with the inputs, e.g.:

<label for="usersname_1">Your full name (100 characters max. including
spaces)</label><input type="text" name="usersname" id="usersname_1"
maxlength="100" tabindex="1" title="enter your name">

'No alarms and no surprises'
--
Andrew Urquhart
- FAQ: www.html-faq.com
- Archive: www.google.com/groups?q=alt.html
- My reply address is invalid, use: www.andrewu.co.uk/contact/




Reply With Quote
  #3  
Old   
Mitja
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 08:43 AM



Koos <root (AT) localhost (DOT) localdomain.invalid>
(news:409b383a$0$61616$e4fe514c (AT) news (DOT) xs4all.nl) wrote:
Quote:
Hello everybody,

I have a PHP application with a lot of form fields. I would like to
automatically have the cursor (focus) jump to the next input element
once MAXLENGTH is reached. I found this:

http://www.htmlcodetutorial.com/form...msupp_162.html

but it's javascript. The app will be approached with several clients,
mozilla, ie, elinks and so far I managed to keep is javascript-free.

Can I do the jump without javascript, that is: in pure html (4)?
Nope. All you can do is reveal The Secret Of The Tab Key And Wondrous
Workings Thereof to the end user - many people still move between form
fields using mouse only.

Quote:
Thanks!



Reply With Quote
  #4  
Old   
Neal
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 09:48 AM



On 07 May 2004 07:18:18 GMT, Koos <root (AT) localhost (DOT) localdomain.invalid>
wrote:

Quote:
Hello everybody,

I have a PHP application with a lot of form fields. I would like to
automatically have the cursor (focus) jump to the next input element
once MAXLENGTH is reached. I found this:

http://www.htmlcodetutorial.com/form...msupp_162.html

but it's javascript. The app will be approached with several clients,
mozilla, ie, elinks and so far I managed to keep is javascript-free.

Can I do the jump without javascript, that is: in pure html (4)?

Thanks!

I remember being on sites which ask for my phone number. Three boxes. So I
type in the 1st box (599) the 2nd 555 and the third 1111. I tabbed, as I
am used to, between the boxes. This all takes, what, two seconds, and I'm
not looking.

Here's how the form got filled in:

Quote:
(59||9) ||555 |
(next box)
1111 |
I had to do it over.

This sort of little "helpful trick" runs against how users expect the
interface to work and should be avoided.


Reply With Quote
  #5  
Old   
Mitja
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 10:02 AM



Neal <neal413 (AT) yahoo (DOT) com>
(newspr7mtzmog6v6656 (AT) news (DOT) individual.net) wrote:
Quote:
On 07 May 2004 07:18:18 GMT, Koos <root (AT) localhost (DOT) localdomain.invalid
wrote:

Hello everybody,

I have a PHP application with a lot of form fields. I would like to
automatically have the cursor (focus) jump to the next input element
once MAXLENGTH is reached. I found this:

http://www.htmlcodetutorial.com/form...msupp_162.html

but it's javascript. The app will be approached with several clients,
mozilla, ie, elinks and so far I managed to keep is javascript-free.

Can I do the jump without javascript, that is: in pure html (4)?

Thanks!


I remember being on sites which ask for my phone number. Three boxes.
So I type in the 1st box (599) the 2nd 555 and the third 1111. I
tabbed, as I am used to, between the boxes. This all takes, what, two
seconds, and I'm not looking.

Here's how the form got filled in:

(59||9) ||555 |
(next box)
1111 |

I had to do it over.

This sort of little "helpful trick" runs against how users expect the
interface to work and should be avoided.
Ah well... just what percentage of users?
I think for majority of people such JS is an welcome aid, especially if
larger amounts of data have to be entered.




Reply With Quote
  #6  
Old   
Neal
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 10:09 AM



On Fri, 7 May 2004 16:02:29 +0200, Mitja <tezt (AT) email (DOT) si> wrote:

Quote:
Neal <neal413 (AT) yahoo (DOT) com
(newspr7mtzmog6v6656 (AT) news (DOT) individual.net) wrote:
I remember being on sites which ask for my phone number. Three boxes.
So I type in the 1st box (599) the 2nd 555 and the third 1111. I
tabbed, as I am used to, between the boxes. This all takes, what, two
seconds, and I'm not looking.

Here's how the form got filled in:

(59||9) ||555 |
(next box)
1111 |

I had to do it over.

This sort of little "helpful trick" runs against how users expect the
interface to work and should be avoided.

Ah well... just what percentage of users?
Whatever percentage has filled in a few forms on web pages using
traditional markup. I see very few sites using the tech you describe
(thank goodness) so it's unlikely the average user will be anything but
peeved by this performance.

Quote:
I think for majority of people such JS is an welcome aid, especially if
larger amounts of data have to be entered.
Well, feel free to do it. Just mark my warning.


Reply With Quote
  #7  
Old   
OJ
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 03:25 PM



"Mitja" <tezt (AT) email (DOT) si> wrote

Quote:
Neal <neal413 (AT) yahoo (DOT) com
(newspr7mtzmog6v6656 (AT) news (DOT) individual.net) wrote:
On 07 May 2004 07:18:18 GMT, Koos <root (AT) localhost (DOT) localdomain.invalid
wrote:

Hello everybody,

I have a PHP application with a lot of form fields. I would like to
automatically have the cursor (focus) jump to the next input element
once MAXLENGTH is reached. I found this:

http://www.htmlcodetutorial.com/form...msupp_162.html

but it's javascript. The app will be approached with several clients,
mozilla, ie, elinks and so far I managed to keep is javascript-free.

Can I do the jump without javascript, that is: in pure html (4)?

Thanks!


I remember being on sites which ask for my phone number. Three boxes.
So I type in the 1st box (599) the 2nd 555 and the third 1111. I
tabbed, as I am used to, between the boxes. This all takes, what, two
seconds, and I'm not looking.

Here's how the form got filled in:

(59||9) ||555 |
(next box)
1111 |

I had to do it over.

This sort of little "helpful trick" runs against how users expect the
interface to work and should be avoided.

Ah well... just what percentage of users?
I think for majority of people such JS is an welcome aid, especially if
larger amounts of data have to be entered.

Hi,

I think you're wrong, but if they're larger amounts of data, what is
the possibility that they will reach MAXLENGTH and the end of their
data at the same time? Works for phone and zip, but everything else
is variable length.

oj


Reply With Quote
  #8  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 03:38 PM



Quoth the raven named OJ:

Quote:
Works for phone and zip, but everything else is variable length.
Phone and zip are not always the same. Wait... what is the zip for
downtown London, England?

--
-bts
-This space intentionally left blank.


Reply With Quote
  #9  
Old   
Daniel R. Tobias
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 05:30 PM



"Mitja" <tezt (AT) email (DOT) si> wrote

Quote:
This sort of little "helpful trick" runs against how users expect the
interface to work and should be avoided.

Ah well... just what percentage of users?
I think for majority of people such JS is an welcome aid, especially if
larger amounts of data have to be entered.
I've run into just the same problem myself; I'm used to tabbing
through the fields myself, and programs that try to change the field
focus on me can get me all out of sync.

--
Dan


Reply With Quote
  #10  
Old   
Neal
 
Posts: n/a

Default Re: jumping to next field without javascript - 05-07-2004 , 06:21 PM



On 7 May 2004 14:30:20 -0700, Daniel R. Tobias <dan (AT) tobias (DOT) name> wrote:

Quote:
"Mitja" <tezt (AT) email (DOT) si> wrote in message
news:<zEMmc.2239$37.311549 (AT) news (DOT) siol.net>...
This sort of little "helpful trick" runs against how users expect the
interface to work and should be avoided.

Ah well... just what percentage of users?
I think for majority of people such JS is an welcome aid, especially if
larger amounts of data have to be entered.

I've run into just the same problem myself; I'm used to tabbing
through the fields myself, and programs that try to change the field
focus on me can get me all out of sync.


If we really want to think about what users are used to, look at the sites
with forms that users most commonly encounter. Yahoo, Ebay, Amazon are
probably among the top. I don't think any of those sites use this type of
voodo bullshit on their users.

While I'll never advise a web designer to look to the big popular websites
as a model for effective web design, they are important in that their
interfaces represent what users are most accustomed to.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.