By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

strange label behavior in IE 6

P: n/a
Back again.

Despite changing the id in the form field and the corresponding 'for' in the
label IE still links the generated label to the form field it was cloned
from. Works in Firefox.

function selectfield(o){
var checked_owner_container =
document.getElementById('checked_owner_container') ;
var row = o.parentNode;
var new_checkbox = row.cloneNode(true);
var checked_box = new_checkbox.firstChild;
var checked_box_label = checked_box.nextSibling;
var old_id =;
var new_id = 'js_' + old_id;
checked_box.setAttribute('id', new_id);
checked_box.checked = true;
checked_box.onclick=function(){deselectfield(this) ;}
Nov 29 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

James Carters wrote:

checked_box.setAttribute('id', new_id);

This is a quick and hasty response, but you could try the following




Julian Turner

Nov 29 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.