You are here: Re: Problems with 'tabindex' « HTML « IT news, forums, messages
Re: Problems with 'tabindex'

Posted by Steve Pugh on 02/22/06 23:34

"Stefan Mueller" <seekware-remove-@yahoo.com> wrote:

>>> This html code should demonstrate my problems with 'tabindex':
>>> <img src= 'pic23.gif' tabindex = '0'>
>>> <input type = 'text'>
>>> <p>
>>> <img src= 'pic12.gif' tabindex = '0'>
>>> <input type = 'text'>
>>> <p>
>>> <img src= 'pic25.gif' tabindex = '0'>
>>> <input type = 'text'>
>>
>> Why are you placing the tabindex attribute on the image and not on the
>> form input?
>
>If I set the tabindex attribute on the form input like
> <img src= 'my_pic.gif'>
> <input type = 'text' tabindex = '0'>
> <p>
> <img src= 'my_pic.gif'>
> <input type = 'text' tabindex = '0'>
> <p>
> <img src= 'my_pic.gif'>
> <input type = 'text' tabindex = '0'>
>then the images never gets the focus if you press the 'Tab' key.

Why do the images ever need to get focus? What can the user do with a
focussed image?

>> Assuming that you do/will assign an id to each image, then in theory:
>> document.getElementById(imageId).focus()
>
>Yes, but I don't know the imageId of the first image because the rows get
>sorted before the focus has to be set to the first image. Is there a way to
>figure that the imageId of the first picture?

You could have the script that randomly sorts the rows tell you the id
of the first image (as presumably it knows the id of the first row).

Or if you know the number of images preceeding the random rows then
document.images[n].focus() where n is the number of preceeding images.

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация