Professional Web Applications Themes

Converting from frame-based using PHP - require_once - Macromedia Dynamic HTML

I am converting an old site, previously using a frameset to combine a menu and a page of images that change using a timeline. Rather than combine the menu and page into one page (the menu would need to be altered in over 50 files when new pages are added), I am using require_once for the menu. The problem is that the only way to display BOTH the menu (from PHP) and the rest of the page in Dreamweaver is to put the PHP require_once script at the end of the source code. BUT this seems to stop the timeline ...

  1. #1

    Default Converting from frame-based using PHP - require_once

    I am converting an old site, previously using a frameset to combine a menu and
    a page of images that change using a timeline.

    Rather than combine the menu and page into one page (the menu would need to be
    altered in over 50 files when new pages are added), I am using require_once for
    the menu.

    The problem is that the only way to display BOTH the menu (from PHP) and the
    rest of the page in Dreamweaver is to put the PHP require_once script at the
    end of the source code. BUT this seems to stop the timeline working.

    The only way to make the timeline work is to put the PHP at the beginning of
    the source code, but this then only shows the PHP part of the page and NOT the
    rest of the page, which ideally I need to edit...

    Any ideas how I can get the PHP to work AND display in Dreamweaver design view
    AND the timeline to play properly?

    Thanks

    colinwalton Guest

  2. #2

    Default Re: Converting from frame-based using PHP - require_once

    colinwalton wrote: 

    If your page is not displaying properly in Design view when using an
    include, it means that the combination of the include and the rest of
    the page constitutes an invalid doent. I note that you're converting
    from frames, which displays separate doents within a frameset. Each
    doent needs a DOCTYPE, head, and body.

    When creating includes, there must be only one DOCTYPE, head, and body
    for the entire doent. The menu in the include file should consist
    only of the HTML for the menu - nothing else.

    --
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/
    David Guest

  3. #3

    Default Re: Converting from frame-based using PHP - require_once

    Great thanks - this helps a lot.

    I have found I have had to get rid of the <body> tags in both doents for it
    to display - I have then added a blank image and set this to start the timeline
    when it loads.

    Its a bit of a clunky way of doing it but seems to work.

    It is now set up so the main file - the one with the timeline, contains the
    DOCTYPE meta tags etc, the includes file is then referred to at the END of this
    doent...

    The includes file has the SCRIPT as well as the HTML to make the menu
    roll-overs work.

    Is this the best way of setting this up? I have fifty of them to do, so don't
    want to be doing it incorrectly 50 times over!

    Ideally I would like to have <body> </body> tags so I can set attributes to
    it - what is the correct way and place to do this, so the timeline works as
    well? or should I just avoid using <body> tags at all?

    Thanks

    colinwalton Guest

  4. #4

    Default Re: Converting from frame-based using PHP - require_once

    > I have found I have had to get rid of the <body> tags in both doents 

    Something is wrong if you have discovered this. The parent page must have
    the body tags. Then you can use either an onload attribute in the body tag
    or a javascript call at the bottom of the page (right before </body>) to
    trigger the timeline.

    BUT - why are you using a timeline at all? If it's only to support the
    menu, there are MUCH better (and much less prehistoric) ways to do this.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
    ==================


    "colinwalton" <com> wrote in message
    news:g4a3pk$pu0$macromedia.com... 

    Murray Guest

Similar Threads

  1. If statement help based on current frame
    By Stormpool in forum Macromedia Flash Actionscript
    Replies: 6
    Last Post: February 15th, 08:17 PM
  2. [PHP] Refresh a frame based on a condition in another frame?
    By Raditha Dissanayake in forum PHP Development
    Replies: 0
    Last Post: September 1st, 07:52 AM
  3. Refresh a frame based on a condition in another frame?
    By Ronald Van Raaphorst in forum PHP Development
    Replies: 1
    Last Post: September 1st, 07:52 AM
  4. Is director frame-based or time-based ?
    By Bobby Tan in forum Macromedia Director Lingo
    Replies: 1
    Last Post: July 25th, 11:43 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139