469,315 Members | 1,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

checking if the same ID appears twice on a page

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

May 17 '07 #1
1 1209
"la***********@zipmail.com" <la***********@zipmail.comwrote in
news:11**********************@u30g2000hsc.googlegr oups.com:
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.

May 17 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sharon | last post: by
reply views Thread by Jerry O | last post: by
8 posts views Thread by TS | last post: by
reply views Thread by Server Control | last post: by
7 posts views Thread by tshad | last post: by
21 posts views Thread by ningxin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.