Reply to Re: Why is the cursor not going to the next checkbox if I press Tab

Your name:

Reply:


Posted by Benjamin Niemann on 12/21/13 11:41

Stefan Mueller wrote:

>> What do you really want?
>>
>> Should the checkbox be toggled by clicking on the image?
>> This can be done by wrapping the IMG and the INPUT in a LABEL element:
>
>
> Yes, the checkbox should be toggled by clicking on the image. I need that
> to color the checkbox. Please see the example on
> http://nrkn.com/customCheck/
>
> Therefore I'd like to reach the image also by pressing the Tab key.
> With your code <label>...</label> the image never gets the focus even not
> with Internet Explorer and Mozilla.

IMG are not supposed to be interactive elements that can get focus (except
for an IMG inside of a BUTTON perhaps). That's why the browser will not
give it focus via tab, no matter how much you try.
If I would not think that your approach (emulating existing elements for the
sake of some pretty colors) is at least a bad idea, I could suggest that
you try using an INPUT with an image as SRC that can get focus...

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/

[Back to original 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

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