homepage Welcome to WebmasterWorld Guest from 54.166.148.189
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Can you find and hide specific text with javascript?
matthewamzn




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

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?

 

Greven




msg:3811637
 11:03 pm on Dec 19, 2008 (gmt 0)

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.

matthewamzn




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

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>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved