php - Dynamic tabindex -



php - Dynamic tabindex -

i have lot of rows, each row has column <input type='text'/> , this:

html:

<table> <tr> <td><input type="text" size="10"/></td> <td><input type="text" size="10"/></td> <td><input type="text" size="10"/></td> </tr> <tr> <td><input type="text" size="10"/></td> <td><input type="text" size="10"/></td> <td><input type="text" size="10"/></td> </tr> </table>

php:

while(!$res->eof) { // come while() other db consult while(!$res2->eof) { // create dynamic columms. } }

i'm creating rows db result, , numbers of columns dynamic, more , less.

i need tabindex follow current column "vertical mode".

i made exp: jsfiddle

any question, please.

thanks.

you need know how many rows have. tab indices this:

1 6 11 2 7 12 3 8 13 4 9 14 5 10 15

here formula getting index of each cell:

tabindex=rownum+(rowcount*colnumber)

i leave implementation exercise reader.

php html

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -