focus on textbox when using php array inputs
Posted: Wed Nov 09, 2005 1:59 pm
Both of these give eratic behaviour in firefox 1.0.7, works fine in IE. Anyone else that has the old version could you test it out?
Specifically it lets me type in the first box, but when I click in the second box the focus jumps back to the first box. If anyone can explain this behaviour that'd be great. I know I can just number the names phone1, phone2 and do that instead of an array, just wondering why this isn't working because I thought it's supposed to.
and I also tried
EDIT: I'm sure I just violated standard or something but if someone could point it out..
Specifically it lets me type in the first box, but when I click in the second box the focus jumps back to the first box. If anyone can explain this behaviour that'd be great. I know I can just number the names phone1, phone2 and do that instead of an array, just wondering why this isn't working because I thought it's supposed to.
Code: Select all
<input name="phone[]" type="text" id="phone1" value="" size="3" maxlength="3" />
<input name="phone[]" type="text" id="phone2" value="" size="3" maxlength="3" />
<input name="phone[]" type="text" id="phone3" value="" size="4" maxlength="4" />Code: Select all
<input name="phone[]" type="text" id="phone[]" value="" size="3" maxlength="3" />
<input name="phone[]" type="text" id="phone[]" value="" size="3" maxlength="3" />
<input name="phone[]" type="text" id="phone[]" value="" size="4" maxlength="4" />