[Javascript] IE work-a-round question (re: checkboxes) [SOLVED]

tedd tedd at sperling.com
Sat Apr 12 11:36:31 CDT 2008


At 7:36 AM -0700 4/12/08, Paul Novitski wrote:
>At 4/12/2008 06:56 AM, tedd wrote:
>>      Error: 'document.getElementById(...) is null or not an object.
>>
>>The offending code is this:
>>
>>function HideTimedLayer(id)
>>      {
>>      document.getElementById(id).style.display = "none";
>>      var id2 = 'c' + id[2] + id[3];
>>      document.getElementById(id2).checked = true;
>>      }
>
>
>Tedd, your code above (...id[2] + id[3]...) indicates that the
>variable id is an ARRAY.  getElementById() takes a STRING as its argument.
>
>Paul

Paul:

Your advice is spot on as usual - that WAS the problem.

The id I was sending the function was typed as an array when I 
thought I was providing a string.

Thanks a bunch.

Cheers,

tedd

PS: To see what I was working on, take a look at this:

http://webbytedd.com/quarters/

Comments?


-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list