Welcome to WebmasterWorld Guest from 54.198.87.238

Forum Moderators: open

Message Too Old, No Replies

Can you find and hide specific text with javascript?

     
11:00 pm on Dec 19, 2008 (gmt 0)

10+ Year Member



I need to hide a specific series of numbers on a website. Is there a javascript code I could put in every page that would find the given text and change it's styling?
11:03 pm on Dec 19, 2008 (gmt 0)

10+ Year Member



Hide how? Keep in the document, but not make it visible? If you're trying to keep people from seeing it for security, this will not as they can just view the source.

Where will the text be? inside a paragragh tag, for example? Or will it be always in the same place, with a div with a unique id around it?

Really we would need to see examples and some more background as to the eng goal, as there are multiple ways to accomplish this.

11:12 pm on Dec 19, 2008 (gmt 0)

10+ Year Member



It will always be in the same place, and it doesn't have to be secure.

If I could change the id tag with javascript, I could hide it with css.

<div id="show">12900</div>

but if 999999 is found change the id tag:

<div id="hidden">999999</div>

 

Featured Threads

Hot Threads This Week

Hot Threads This Month