javascript - Is changing tabindex during "runtime" asking for trouble? -


right now, i'm developing dojo widget acts validation widget piece of user information. main concept there div nested input , nested div further nested input basically:

<div id="top">     <input name="pass">     <div id="collapse">         <input name="passvalidate">     </div> </div> 

what supposed happen if there nothing in pass, passvalidate should not accessible , collapse should be collapsed , hidden. way i'm making happen right latching onto keydown event of pass input field , if key tab , pass field not empty, tabindex of passvalidate changes can tabbed to.

if validation field becomes selected, , user tabs again, taken top of page since actual element passvalidate located @ bottom of page, far far away seems in tabflow.

my implementation works fine. haven't run errors why i'm posting psudocode. however, 1 of other developers on team seems apposed altering element's tabindex if isn't necessary. can't think of way without more complicated , hard coded handlers make sure can't tab validation field when shouldn't.

so bottomline question is, altering tabflow tabindex programatically safe way ensure behavior, or potentially run problems browser might adversely react having page's tabindexes altered periodically?


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -