Click to See Complete Forum and Search --> : Form focus prob


turb
12-09-2003, 02:45 PM
Hi!

i've a php page with some form object.

<select name="typeR[]" size="5" multiple class="menu" onChange="document.location='formDetail.php?code=<?=$code?>&type='+this.value">

With this code, when a user select a value from the list, the page reload to display some value specific to this value ... work great but how can i set focus on the item user have selected after an onChange event???

AdamBrill
12-09-2003, 10:20 PM
Since you are using PHP to refresh the page, you would have to do it onload. Try using something like this in the body onload:

document.formname.elementname.focus();