views:

77

answers:

2

Hi All,

I used a tabindex in my code, everything is going great its works finr in Firefox, ie8, safari but its not working properly in ie7, when i used a tab index in ie7 it come up to two input file then it get back to index one;

example:

<div tabindex=1>
    <a onclick="slide_down()" style="cursor:pointer;width:160px; padding-bottom:10px;" >sample link</a>
</div>
<div tabindex=2>
    <a onclick="slide_down()" style="cursor:pointer;width:160px; padding-bottom:10px;" >sample link1</a>
</div>
<div tabindex=3>
    <a onclick="slide_down()" style="cursor:pointer;width:160px; padding-bottom:10px;" >sample link2</a>
</div>

Thanks

+1  A: 

Tabindex isn't allowed on a div tag. Try to put it in your link:

<div>
    <a tabindex="1" onclick="slide_down()" style="cursor:pointer;width:160px; padding-bottom:10px;" >sample link</a>
</div>
Treur
A: 

Are you using a DOCTYPE? Since tabindex is not supported in DIV tag, and IE7 compatibility layer may enable or disable the attribute based on DOCTYPE.

From HTML 4 specification:

The following elements support the tabindex attribute: A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA.

http://www.w3.org/TR/REC-html40/

Lorenzo