Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Thursday, April 6th, 2006

Time Event
4:01p
I don't get this...
document.getElementById(someID).innerHTML = document.getElementById(someOtherID).innerHTML

if (document.getElementById(someID).innerHTML==document.getElementById(someOtherID).innerHTML)
   {
   alert('the same');
   }
else
   {
   alert('different');
   }
Nice and simple - put the contents of one div into another, and then compare the two. Fine. So why does Firefox say they are the same but IE6 claims they are different?

EDIT Scrub that - I've got it fixed. When comparing the contents of an element, IE expands all URLS in links to absolute URLS...

<< Previous Day 2006/04/06
[Calendar]
Next Day >>
About LiveJournal.com
Image