473,503 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How get value of a drop down in Internet Explorer?

How does one find the value of a drop down in Internet Explorer?

The form below works in Firefox and Safari. But not in Internet
Explorer. Can someone tell me how to code this so IE understands it?

<script language="javascript">
function copyDescription() {

document.myForm.Description.value=document.myForm. MakeDescription.value
}
</script>

<form name="myForm" id="myForm">
<SELECT name="MakeDescription" onChange="copyDescription();">
<OPTION selected value="">Choose</OPTION>
<OPTION>A</OPTION>
<OPTION>B</OPTION>
<OPTION>C</OPTION>
</SELECT>
<br /><br />
<input name="Description" id="Description" type="text" />
</form>

Any help appreciated!

Apr 19 '07 #1
2 14346
an*********@gmail.com said the following on 4/19/2007 5:27 PM:
How does one find the value of a drop down in Internet Explorer?
Assign it a value attribute.
The form below works in Firefox and Safari. But not in Internet
Explorer. Can someone tell me how to code this so IE understands it?
<option value="A">A</option>

IE doesn't correlate the value of a select as being the text of a select
element.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 19 '07 #2
On Apr 20, 7:27 am, antiiner...@gmail.com wrote:
How does one find the value of a drop down in Internet Explorer?

The form below works in Firefox and Safari. But not in Internet
Explorer. Can someone tell me how to code this so IE understands it?

<script language="javascript">
The language attribute is deprecated, type is required.

function copyDescription() {

document.myForm.Description.value=document.myForm. MakeDescription.value}
Since your options don't have value attributes but do have text
attributes, you can use:
document.myForm.Description.value=document.myForm. MakeDescription.text;
Why doesn't IE follow the W3C spec? Dunno.

>
</script>

<form name="myForm" id="myForm">
<SELECT name="MakeDescription" onChange="copyDescription();">
<OPTION selected value="">Choose</OPTION>
<OPTION>A</OPTION>
<OPTION>B</OPTION>
<OPTION>C</OPTION>
</SELECT>
<br /><br />
<input name="Description" id="Description" type="text" />
</form>

--
Rob
Apr 20 '07 #3

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

Similar topics

2
3517
by: Xerxes | last post by:
Hi, how can I pass the returned value from Javascript to PHP? I have: ------------------------------------------------------------------------ ------ if ( x>y) {
1
1568
by: TJ | last post by:
I have a java/html question. Why does a drop down select box display the values of the drop down on the web page in Netscape communicator where as it displays correctly in a drop down box in...
1
3983
by: ehm | last post by:
I apologize in advance for the cross-post (from microsoft.public.inetexplorer.scripting), but that board seems dead. I have what I think is a fairly simple problem, but I cannot figure this out....
1
2287
by: Smriti Dev | last post by:
Hi, I have a drop down menu with a listing of communities and I use it to select a community, selecting a letter ie. "T" , I get bumped to the "T" section to choose communities that start with...
3
2953
by: Bilal | last post by:
Hi, I've been looking all over the net for a way to increase the size of a drop down menu without any success. Does anyone perhaps have a way to display 11-15 items on a menu without having...
7
6500
by: Larry R Harrison Jr | last post by:
I am looking for javascript and a basic tutorial on how to make mouse-over drop-down menus--the type that when you "hover" over a subject links relevant to that subject "emerge" which you can then...
3
4284
by: Reb | last post by:
Hi, I am using drop down menu in my pages. In one of my page,there is a listbox control below the menu. This listbox control is hiding the drop down menu items. How can i make the drop down...
0
2854
by: Yavuz Bogazci | last post by:
Hi, i have build a form with a listbox and the function that he user can drag and drop files from the windows explorer in this listbox. this works for me when i start it on my localmachine. ...
1
1714
by: StevePBurgess | last post by:
Hi I am using a drop down menu adapted from the one in Stylin with CSS by Charles Wyke Smith. The CSS is below. It works perfectly in Internet Explorer (using the csshover behaviour file) but...
0
7089
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
7282
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,...
1
6995
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
7463
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...
1
5017
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...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.