471,859 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,859 software developers and data experts.

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 1242
"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
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.