On Fri, Apr 11, 2008 at 4:49 PM, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
>
> Sorry for the lame app, but the program worked for Safari (Mac and Win).
> However, I did get it to work for FF and a couple of other browsers (Mac and
> Win), see again:
>
> http://webbytedd.com/quarters
>
> But the critter is dead in the water for all versions of IE -- if -- I
> don't figure out a way around the following single statement.
>
> document.getElementById(id).checked = true;
>
> Granted it's javascript, but all that line does is to set a checkbox
> variable (id) to 'on'. Surely, $M code can do that, right?
>
> After reading a bunch, it seems that M$ has a better way to do things (big
> surprise there, huh?) and thus does not use the document.getElementById(id)
> thing that everyone else in the world uses. Instead, they use something
> "better" and it's not documented well as is typical.
>
> Unfortunately, I have not been able to find a M$ work-a-round.
>
> So, what I need is:
>
> if (document.getElementById)
> {
> document.getElementById(id).checked = true;
> }
> else
> {
> <<<<< inset solution here. >>>>>>
> }
>
> All the code has to do is to set a simple checkbox to 'on' in IE.
hmm. looking at the prototype.js lib, which has the $() function to replace
document.getElementById(). it supports either a dom object or a string that
represents an id attribute, but key note is its 'cross-browser' and i dont
see a workaround in there for ms..
function $(element) {
if (arguments.length > 1) {
for (var i = 0, elements = [], length = arguments.length; i < length;
i++)
elements.push($(arguments[i]));
return elements;
}
if (Object.isString(element))
element = document.getElementById(element);
return Element.extend(element);
}
ie has some primitive debugging tools, have you checked one of those to see
if theres an error on the page? if you choke the js interpreter w/ a fatal
error you might kill all subsequent js interpretation on the page :O ie has
been the bane of my existence on more than one occasion.
-nathan