On 14 Sep 2004 02:45:46 -0700, ouioui <> wrote:
[snip]
> <form name='addform' id='addform' action='add_dossier.php'
> method='post' >
> .....
> <select size='1' name='consultant_id' id='consultant_id'>
> <option value='5'>Paul Poupo</option>
> <option value='6'>Franck Schmith</option>
> <option value='17'>Pascal Belci</option>
> </select>
> ....
> </form>
[snip]
> self.opener.document.forms['addform'].consultant_id.value = 17;
[snip]
If you're trying to change the currently selected item, modify the
selectedIndex property. To select the third item, you'd use:
opener.document.forms['addform'].elements['consultant_id'
].selectedIndex = 2;
Hope that helps,
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
|