This is a migrated thread and some comments may be shown as answers.

[Solved] Select Element Looses Selected Item In IE

2 Answers 94 Views
Editor
This is a migrated thread and some comments may be shown as answers.
leapopotomus
Top achievements
Rank 1
leapopotomus asked on 20 May 2008, 03:26 AM

The Editor does not remember the selected item of a Select Element in IE.

You can see this behavior in action by pasting the below html in the html view then switch to design view.

<select id="Select1" name="Select1">  
    <option value="ACT">Australian Capitol Territory</option> 
    <option value="NSW" selected="true">New South Wales</option> 
    <option value="NT">Northern Territory</option> 
    <option value="QLD">Queensland</option> 
    <option value="SA">South Australia</option> 
    <option value="TAS">Tasmania</option> 
    <option value="VIC">Victoria</option> 
    <option value="WA">Western Australia</option> 
</select> 

In design view it will have the 2nd item correctly selected, but if you switch back to html view it will automatically select the first item.

The Content property will also have the first item selected, regardless of what item is selected in design view.

Firefox did not have any problems remembering which item was selected.

Is there a way to make IE remember which item was selected?

2 Answers, 1 is accepted

Sort by
0
Dimcho
Telerik team
answered on 21 May 2008, 10:31 AM
Hi leapopotomus,

We reproduced the problem on our side, logged it in our bug tracking system and will research what is causing the problem.


Your points were updated.

Sincerely yours,
Dimcho
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
leapopotomus
Top achievements
Rank 1
answered on 23 May 2008, 01:34 AM
Thank you for your reply Dimcho.

I have also found that if you attach a "size" attribute to a Select Element effectively making it a Listbox then the selected item is cleared altogether when switching away from design view.

<select id="Select1" name="Select1" size="4">  
    <option value="ACT">Australian Capitol Territory</option> 
    <option value="NSW" selected="true">New South Wales</option> 
    <option value="NT">Northern Territory</option> 
    <option value="QLD">Queensland</option> 
    <option value="SA">South Australia</option> 
    <option value="TAS">Tasmania</option> 
    <option value="VIC">Victoria</option> 
    <option value="WA">Western Australia</option> 
</select> 
Tags
Editor
Asked by
leapopotomus
Top achievements
Rank 1
Answers by
Dimcho
Telerik team
leapopotomus
Top achievements
Rank 1
Share this question
or