Can javascript from one iFrame get mixed up with javascript from another?
<p>I have a page which contains several iframes.  The pages in these iframes keep updating themselves with numbers (they all use the same library) and dates, and often contain divs that have the same IDs as a div in other iframes.</p>

<p>Some of these numbers go through a function to add commas to make them look pretty, but some are designed to hold dates so they don't call that function.  The divs to update are selected with document.getElementByID.</p>

<p>My problem is sometimes (rarely, but if you leave the page up for a day you'll often see a few instances) the dates are having commas added into them (which screws up the date formatting, of course).  The page script running in that iframe does not call the addCommas function.</p>

<p>My guess is that because the div with the date in it may have the same id as one in another iframe, if they run at the exact same time the engine may be confusing the two.  Does that sound plausible?</p>

<p>I was hoping that being in different pages the running scripts would be completely independent of each other (and that documentX.divIDA would be entirely separate from documentY.divIDA, even if both are contained in iframes inside documentV), but are they not?</p>

<p>I've set up a test by opening one of the pages on it's own and I'll leave it undisturbed over the weekend, to confirm it is caused by interference from another page, but I thought I'd ask the experts anyway.</p>
