Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Tabindex & Div (http://www.velocityreviews.com/forums/t930193-tabindex-and-div.html)

Mad Max 03-13-2007 06:08 AM

Tabindex & Div
 
Hi,

I have a div with a number of buttons in it.
I want the tab to iterate within these buttons and never leave the
div.
(Not even tp the Url or the toolbars)
Any idea on how to go about it ?

Regards
Lav G


Ivo 03-13-2007 06:33 AM

Re: Tabindex & Div
 
"Mad Max" <gupta.lav@gmail.com> wrote
> I have a div with a number of buttons in it.
> I want the tab to iterate within these buttons and never leave
> the div. (Not even tp the Url or the toolbars)
> Any idea on how to go about it ?


Focus the first button onblur of the last.
Or if you don't to mess with the button itself : have a dummy button after
the last, and redirect its focus. The dummy should be invisible to the human
user but the machine must be tricked into thinking it is there so that it
can receive focus.

<div>
<button id="b1">
<button>
<button>
<button
style="position:absolute;left:-999px"
onfocus="document.getElementById('b1').focus();"
>

</div>

hth
ivo
http://4umi.com/web/javascript/




All times are GMT. The time now is 01:46 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.