Re: cloneNode, Ad Rotation, caching, iframes - issue issues issuess
"Ian Petersen" <[email protected]> Wed, 29 Mar 2006 13:52:14 -0500
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Hi Mandy, It sounds like you're having problems with cloneNode. Is there a reason you need to clone the ad? As I understand it, your algorithm is like this: 1. download an ad into a cache 2. when the user makes an action, move the cached ad into the "active" area 3. goto 1 If that's right, then you're never going to re-use the node that you're trying to clone. Why not just move it? In other words, use cache.innerHTML = 'downloaded content' to create the cache, and then active.removeChild(active.firstChild) active.appendChild(cache.removeChild(cache.firstChild)) to move the cached ad into the active area. Anyway, it was just a thought. Oh, and it's been a while since I've worked with the DOM directly, so I don't know if my snippets will actually work--they're just meant to be illustrations. Ian -- Tired of pop-ups, security holes, and spyware? Try Firefox: http://www.getfirefox.com Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wdf-dom/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/