SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help with javascript html tag generator

    Im using a php simple cms program which allows me to use templates to format my content.

    I need help in stripping out (removing) the generated <img src="url"> tag when i insert image. I want to use javacript so its post processed (after the server has interpreted the php code) because I only need to do this in one category of my content.

    Can you please help me with this one... I need to integrate it in one of my templates thanx a lot.

  2. #2
    SitePoint Evangelist comfixit's Avatar
    Join Date
    Dec 2004
    Location
    Pasadena
    Posts
    537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can at least point you in the right direction. Check out Regular Expressions and String Manipulation functions in javascript. Using either should give you the tools needed to make the changes you want.

    You may need to loop through all the elements in the DOM, check for the instance of what you want to strip out. And if you find it replace the DOM element. Again the use of Regular Expressions or String Manipulation functions should do the trick for you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •