Click here to Skip to main content
16,011,383 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
how can I set tabindex property for an HTML input item using javascript
I tried the following

JavaScript
function onPageLoad()
{
  if(condition)
  {
    document.getElementById("fieldName").tabindex =12;
    alert(document.getElementById("fieldName").tabindex);
  }
}


well , it alerts '12' and that's good , but the tabindex property doesn't work for this element , while it works for other elements that are set statically ...

thanks in advance ...
Posted
Updated 23-Nov-11 23:04pm
v2

 
Share this answer
 
Comments
mido_h_89 24-Nov-11 6:13am    
that doesn't work , thank u anyway ...
If I am not wrong, you should use tabIndex instead of tabindex.

you can check it at http://www.w3schools.com/jsref/prop_html_tabindex.asp[^]


Regards
Mayank Kukadia
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900