473,395 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How select a selected option with "value" in IE

Hi,

I try to have a communicatition between 2 windows

In the first one i have a HTML styled select like that :
<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>

In the second windows (opened by the first) i try to select a selected
option with his value.

This code :

self.opener.document.forms['addform'].consultant_id.value = 17;

is ok with mozzilla or firefox (Pascal Belci is well selected) but
don't work with IE (nothing append).

How can i selected an option with Internet explorer ?

Best regard
Jul 23 '05 #1
1 4482
On 14 Sep 2004 02:45:46 -0700, ouioui <br***********@anova.fr> 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.
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Russ Perry Jr | last post by:
I'm using "ID" and "Value" in the generic sense here... Let's say one page I had a <html:select> with a collection like this: <html:options collection="items" property="key"...
0
by: jhonz | last post by:
I have come across a strange circumstance. I have user controls with dropdownlists that interact fine during times where the web server has minimal load. But once things pick up and postbacks...
2
by: IkBenHet | last post by:
Hello, I am uploading a file using this form in ASP.NET. I have also added a simpel textfield: <form runat="server" enctype="multipart/form-data"> <input type="file" id="oFile" Name="oFile"...
0
by: Erich93063 | last post by:
I am using Cold Fusion to access an ODBC connection for an accounting program called MYOB. They provide the ODBC driver that you can install. I have it installed and I used there utility to check...
1
by: waltnixon | last post by:
I've got an MS Access query which runs fine when double clicked and returns all of the rows in a test database I'm building. I've set up a multi group report based on the query. I immediately...
1
by: bodilima | last post by:
Dear All, I'm new to this! I wanna insert selected values from form "SaveModel" to form "SaveMake" <input name="makeID" value="<<<<need to insert here(x)>>>>"> & <input name="make"...
1
by: sosamv | last post by:
I'm trying to sort a select list using javascript...using : example: <option value="1">zebra</option> var a = document.getElementById('mylist').options.text; or
10
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
6
by: cepera | last post by:
Hi guys! How I can retrieve "option value" info from select tag? I am using this code, but it is only let me get "name". I need to pass this value to second select tag. I found this code here:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.