Connecting Tech Pros Worldwide Forums | Help | Site Map

checking if the same ID appears twice on a page

laredotornado@zipmail.com
Guest
 
Posts: n/a
#1: May 17 '07
Hi,

I was curious to find a function that would tell me if a particular ID
occurred more than once on a page. The twist on this question is that
I can't do "View Source" because I have some JS that manipulates the
DOM while the user is interacting with the page. But at an arbitrary
point in time, I'd like to know if that manipulation has messed up and
inserted the same ID more than once.

Thanks for help, - Dave


Good Man
Guest
 
Posts: n/a
#2: May 17 '07

re: checking if the same ID appears twice on a page


"laredotornado@zipmail.com" <laredotornado@zipmail.comwrote in
news:1179432225.528819.157090@u30g2000hsc.googlegr oups.com:
Quote:
Hi,
>
I was curious to find a function that would tell me if a particular ID
occurred more than once on a page. The twist on this question is that
I can't do "View Source" because I have some JS that manipulates the
DOM while the user is interacting with the page. But at an arbitrary
point in time, I'd like to know if that manipulation has messed up and
inserted the same ID more than once.
>
Thanks for help, - Dave
Hi Dave

If you don't already, try developing using Firefox. If you use the built-
in DOM inspector (it opens up in a new window: ctrl-shift-i, but might not
be present unless you chose a custom installation), you can inspect your
URL and perform page operations while getting an up-to-date version of the
DOM as it changes.

You should also install Firebug (http://www.getfirebug.com) which offers a
multitude of developer-friendly modules, including an HTML tab which also
shows the DOM as it changes.... in fact, the html code briefly flashes
yellow so you can tell which DOM element was manipulated.

Closed Thread