Results 1 to 3 of 3

Thread: Help - PHP for loading 2 pages

  1. #1
    Join Date
    Apr 2010
    Location
    Berlin, Germany
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help - PHP for loading 2 pages

    Hi everybody,

    is there a way to load 2 html pages one on top of the other? Well, the one on top got transparency, you know?

    Thru the transparent parts you can see the page behind.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    In PHP, all you need is to do include(). Or you can just put the HTML for both pages into the source code.

    BUT-- to get them to be arranged in that way, to have transparency, etc., you will need some very complex HTML, CSS and maybe Javascript. PHP cannot 'do this' for you. It can be generated by PHP, but needs to result in the HTML/CSS/JS.

    Also, you can't have two COMPLETE HTML pages-- they will need to be partial HTML pages, such as only what is inside the <body> section. If you have two <html></html>...<html></html> sections you will get some very weird errors and certainly be making an invalid page.

    The next step for this is to create it WITHOUT PHP as a test. Then you can try to make it dynamic using PHP to generate the result.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    This is the sameish topic in 2 threads

    http://www.dynamicdrive.com/forums/s...t=54312&page=3

    You need to get the source of the page the user requests, get into that source and put your overlay in, then output that source code on your page. The file_get_contents is to get the source code the find <head> is to find the head of the document then put in your "splash.js" I assume your splash.js is the overlay with appropriate css/html written into it.
    Corrections to my coding/thoughts welcome.

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
  •