SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 1999
    Location
    Highlands Ranch, CO
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strip out HTML,HEAD, and BODY tags of include file?

    I am wondering if it is possible to strip out the <html><head></head><body></body></html> from an html page using ASP.

    I want to use the include function to include a page into a template, but the 'included page' has these tags (and obviously, so does the page I am including it into).

    I dont have the option of removing the tags permanently from the included file, so I am wondering if there is a way for the template page to call the included page, and strip out those tags?

    I think it may be able to be done with PHP, but is it possible to do with ASP?

    TIA!

  2. #2
    SitePoint Zealot
    Join Date
    Dec 1999
    Location
    Highlands Ranch, CO
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I think I found something that may work, but need help with writing the code.

    The function is ExtractBody() and it is shown here: http://aspemporium.com/aspEmporium/e...ml_parsing.asp (near the bottom)

    My question would be how do I write this in the template that I want to bring the included file into, so that it extracts the body from include.html and places it into template.asp?

    Thanks again!


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
  •