Skip to main content
December 19, 2006
Question

tabindex

  • December 19, 2006
  • 3 replies
  • 343 views
would there be a way to get the tabindex to stay once an item is selected this is my code

right now it selects what the client selects and refreshes the page however the tab goes back to the address bar in IE and does not stay on the dropdown list the client was on.
This topic has been closed for replies.

3 replies

December 19, 2006
you can use it on any element.

you'll need to get creative and pass your form the name of the field that triggered the submit so you'll know which field to give focus when the page reloads.

you could also look at an AJAX solution using something like Spry or JSMX.
December 19, 2006
can i use this code on more than one Dropdown list I have 4 of them and i would like this to happend once they select one it stays on that one till he selects from the second dropdown

is that possible
December 19, 2006
you'd want to look at using JavaScript to give focus() to the field that you want. if it's always going to be that particular field, add the following JS:

<script type="text/javascript">
onload = document.YOURFORMNAMEHERE.model.focus();
</script>