#210 ✓works_for_me
hobodave

Ajax.Updater not properly updating options within a select element in IE6

Reported by hobodave | July 8th, 2008 @ 05:56 PM | in 1.7

I'm using the following snippet of code to update the tags of a element. It works, but in IE6 it's generating several lines of blank options. These appear to be related to how many options were in the element before the update occurred.

new Ajax.Updater(elem.id, 'new/format/html', {
    method: 'get',
    parameters: {
        type: elem.id.split('-').last(),
        value: $F(e.target.id)
    }
})

This results in the following request:

http://.../new/format/html?type=problemtype_id&value=9

and the following is returned:

<option value="">Please select</option>
<option value="18">Clinical Care</option>
<option value="17">Communication</option>
<option value="21">Environment</option>
<option value="19">Overall Experience</option>
<option value="20">Staff</option>

If the select element previously had say, 30 options, after updating it with these 6 new options, it would have 24 blank options resulting in a very large select box to display the 6 options.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages