Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Invalid Tags via ASP

Status
Not open for further replies.

derrickorama

Programmer
Jun 30, 2006
25
US
Does anybody know of a way to load an ASP page whilst removing certain tags before it's fully loaded? Example: We use certain tags that are invalid such as <Content> and such (for a content management application) and it's difficult to validate a page sometimes due to these invalid tags. They aren't going to be removed anytime soon, so I was wondering if there was a way to remove them when the ASP page loads.

Currently, to validate a site that we've developed, we need to run the page through a PHP script that I made that removes the tags using regular expressions.

I just wanted to know if there was a way to correct these invalid tags without removing them from the pages themselves. More so, to remove them when they are loaded from a browser.

Any help is appreciated.

Thanks,
Derrick
 
Maybe look at onload funtion that JavaScript provides? Inside you can use GetElementsByTagName function to get array of the html elements you wish to change

 
Yea, my friend was telling me to try JavaScript. I was more or less looking for a server-side route to solving the issue. I've posted this on the ASP forum now. We'll see how it goes. Thanks though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top