This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Array
Comment from: Todd [Visitor] Email · http://www.savagevenus.net
That's an interesting little quirk! I'll have to remember that for my future endevors.

I've come across many little bugs like this lately (mostly because I've been forced to test with IE7 lately.. thankyouverymuch Automatic Updates!).

It's becoming more and more like an onion.. the more you unravel and dig deeper in to it, the more it stinks! :)
04/06/07 @ 10:03
Comment from: Noid [Visitor] Email
Brilliant. Thank you. I built a form in Firefox - and it worked fine... but in IE I was getting 'undefined' for the value of my textarea. It was driving me crazy - I was about to fork my javascript until I found your page in the search engines. I just had to rename the ID of the textarea. Thanks again!
04/27/07 @ 15:50
Comment from: Chris W [Visitor] Email
The Dojo Toolkit's dojo.byId() contains a "fix" for precisely this problem. I now never use just plain document.getElementById() thanks to this bug. Here's what I use (lightly adapted from Dojo):


// use $('myId') instead of document.getElementById('myId')

var $ = function (id, doc) {
if((id)&&((typeof id == "string")||(id instanceof String))){
if (!doc) { doc = document; }
var ele = doc.getElementById(id);
// workaround bug in IE and Opera 8.2 where getElementById returns wrong element
if (ele && (ele.id != id) && doc.all) {
ele = null;
// get all matching elements with this id
eles = doc.all[id];
if (eles) {
// if more than 1, choose first with the correct id
if (eles.length) {
for (var i=0; i < eles.length; i++) {
if (eles[i].id == id) {
ele = eles[i];
break;
}
}
// return 1 and only element
} else { ele = eles; }
}
}
return ele;
}
return id; // assume it's a node
}
05/10/07 @ 23:32
Comment from: alfredo [Visitor] Email · http://www.alfredonline.es
Thank you, after a couple hours I've solved a getElementById problem thanks to your comments!
Great!
Regards.
:)
10/23/07 @ 14:49
Comment from: Roger [Visitor]
@Chris,

That fix is pretty good, but it could be better. See workaround #3 on this site:
(Google "Web Bug Track getElementById")
(i tried to give a link but this site refused any urls)

It gets around the obj.id bug (that yours doesn't), and it loops only the real possible matches (e.g. start looping at 1 (one) because you KNOW the first match is WRONG!)
02/18/08 @ 15:29

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
:!: :?: :idea: :) :D :p B) ;) :> :roll: :oops: :| :-/ :( :'( |-| :>> ;D :P :)) 88| :. :no: XX( :lalala: :crazy: >:XX
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Array
« How To Remove Phantom Unread Events From Outlook After Importing iCal FileAssumptions And Requirements - Tips on avoiding scope creep »