tags:

views:

102

answers:

2

When you render: <input type="file" />

you get a box and a button, right? (At least in Firefox and IE.)

in IE how you can tab to (focus) both the box and the button or only button.

+1  A: 

The text box and button act as the one element in the browsers so you can only set the tab index to the thing as a whole, not each element. To focus the file input use: $('input[type=file]').focus();

Ambrosia
I had hard time understending the question, too. But I think I finally got it- is there a key combination to switch (tab to) the file input like in firefox? In firefox you only need to press the tab key to get to the next input.
stefita
A: 

You get a box and a button, right?

Nope. Google Chrome on Ubuntu, for example, doesn't have a textbox. You shouldn't expect every browser on every OS to have the same ugly form widgets as IE.

Ms2ger