View Full Version : Dynamic TabIndex

06-28-2006, 10:01 PM
Okay, I guess I either wasn't clear enough or phrased this badly. Sorry. <wince> I'll try again. Here's the url. Feel free to submit it if you need to. I have the strings that do the actual update to the database commented out. http://menu-manager.com/testbed/TestRecipe.php

I have a form to which three fields are added as many times as necessary by the user. I want the user to be able to tab through the fields without having to resort to using the mouse (speeds entry). There are 9 fields before the dynamic section of the form and a good half-dozen after. It's like this:


Then the user can add additional AddFields

AddedField3b, etc.


Because the form uses an editor (tinyMCE) directly after the section of added fields, and because the editor has icons in its header which can have focus, when the user hits tab and jumps the focus from the last AddedField into the textarea controlled by the editor, it ends up focusing to the first of the icons of the editor instead of jumping into the textarea. Because the editor script works for a number of different things setting the tabindex for the editor buttons isn't really an option.

If I set a variable which I increment with each form field, that should work . . . ? Can I instead set a variable which I increment each time a row of fields is added and just use that to get past the icons and into the text field?

Feedback? Ideas? Help?

I think I'd be more comfortable if I knew how to insert a value into html from javascript. I just don't know enough . . . I'll keep pecking away at this.