Jump to content

tabindexing using javascript


napsternapster

Recommended Posts

The syntax is not as easy as you are saying and I've tried your advance but z giving producing an endless loop.Think of aform which has thousands of text boxes and select dropdowns your roles is to display the next textbox after a select drop down selection and set the focus on the new display.

 

basic syntax for reading the textboxes using javascript

 

for(var i = 1; i <= out_count;i++)

{

  for(var b = 1 ; b <=middle_count ;b++)

  {

      for(var g = 1; g <=9;g++)

      {

          var textBox = document.getElementById("txt"+i"_"+b+"_"g).id

          var selection = document.getElementById("sel"+i"_"+b+"_"g)).id

 

          if(document.getElementById(selection).id == 'inline)

          {

             

                next_index++

                  document.getElementById(info_id).tabIndex = next_index;

document.getElementById(info_id).tabIndex = document.getElementById(info_id).focus();

  }

  else if(document.getElementById(selselection id).style.display == 'inline')

  {

next_index++;

document.getElementById(selection ).tabIndex = next_index;

document.getElementById(selection ).tabIndex = document.getElementById(selection ).focus();

}

          }

      }

  }

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.