Re: Quarters -- ERRORS --

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd 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.

Anyone have any ideas?

Cheers,

tedd

PS: I'm going to post this on a js list as well.

PPS: You have to wonder how much more technically advanced we would be if we weren't always held back by the "what's in it for me" shortsightedness of M$.



What you talkin' bout?
Document.getElementById() works fine in IE5 and later.
There must be some other error.

You could check that document.getElementById(id) is actually returning something - if it fails it returns null.

Maybe you have given your checkbox a name and not an id, although that should fail with FF (and Safari) too...

It's fine on IE7 - anything older than IE7 is too broken to be usable, really. :)



--
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux