Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts

    showing only html content from #included file

    ok so I want to deploy a new default.asp to all of my web site's sub pages ( department pages)

    I dont want admins to edit default.asp directly

    in each folder Im goign to include sidebar.asp and mycontent.asp

    I wantsidebar.asp and mycontent.asp to be full fledged documents including doctypes and css references.


    My question , is it possible, in this scenario, to use includes to display the html content only of the included files? - meaning how can i strip everything but the contents of the <body> element when including sidebar.asp and mycontent.asp?

    - I think you can do this in php, I jsu have no idea what this method is called so google didnt help much

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    nevermind I found it, but as it turns out this isnt a good way to go for this purpose anyhow.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,155
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    So what did you go with?

    I would do it by breaking up the files.

    So, for example, I might have:
    sidebar-header.asp
    sidebar-body.asp
    sidebar-footer.asp

    And then sidebar.asp simply #include's those 3 files. Whereas a page that needs only the body of the sidebar #include's sidebar-body.asp.

    And so on.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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