homepage Welcome to WebmasterWorld Guest from 50.16.112.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

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

5+ Year Member



 
Msg#: 3811630 posted 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

5+ Year Member



 
Msg#: 3811630 posted 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

5+ Year Member



 
Msg#: 3811630 posted 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