Reply to Re: Problems with 'tabindex'

Your name:

Reply:


Posted by Jonathan N. Little on 02/23/06 16:04

Stefan Mueller wrote:

>>Why do the images ever need to get focus? What can the user do with a
>>focussed image?
>
>
> I need a focused image e.g. to color a ckeckbox. Here is an example
> http://nrkn.com/customCheck/
>
>
>
>>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.
>
>
> Cool, with
> document.images[0].focus()
> I can set the focus to the first image. Is there also a similar command to
> set the focus to the first input box?


<script type="text/javascript">
function gotoFirst(){
var inputs=document.getElementsByTagName("input");
if(inputs.length){
var theFirst=inputs[0];
theFirst.focus();
}
}
window.onload=gotoFirst;
</script>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[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

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