IE problem +Unexpected call to method or property access

J

Janek

howManyTimes=1;
newNode= new Array();

while(howManyTimes<=4){
newNode[howManyTimes]=document.createElement('div');
calendar.appendChild(newNode[howManyTimes]);
++howManyTimes



}


Above code should create few dives (4), and it does in Firefox. But
it
doesnt in IE.
My question is how to do same thing in other way. (not writing it in
ugly way).
(IE error messege is in the topic.)
 
J

Janek

Thanks for ur advice.
But it doesn't make the same thing (its my foult) "calendar" stands
for document.getElementById('date1'). So ur advice doasnt help.
Strange thing that
document.body.append... and document.getElementsByTagName('div')[]
works,
but getElementById, document.body.childNodes[] doesnt.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,123
Messages
2,570,740
Members
47,295
Latest member
riya007

Latest Threads

Top