473,406 Members | 2,710 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,406 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 4483
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.