Results 1 to 2 of 2

Thread: Javascript for selective Includes? (for multiple department issue)

  1. #1
    Join Date
    Sep 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Javascript for selective Includes? (for multiple department issue)

    Hello,
    I've had an idea on implementing what I posted in

    http://www.dynamicdrive.com/forums/s...=overstock.com

    I prefer the client side approach over PHP etc server side approach. The idea is to use Includes. My current site is implemented by using Includes (every page) for page borders. The <body> of each page basically is a table.

    <table>
    <tr>
    <td colspan=3> Include top border page </td>
    </tr>
    <tr>
    <td > Include left border page </td>
    <td > body HTML code </td>
    <td > Include right border page </td>
    </tr>
    <tr>
    <td colspan=3> Include bottom border page </td>
    </tr>
    </table>

    With using cookie to remember which department I am at now, I can selectively include different/corresponding top, left, right and bottom borders. If I make the "body HTML code" also an Include, then I can load different body code for different department as well.

    Now what I need is if someone could shed some light on how the Javascript can be implemented to selectively Include different pages. I guess I know where to find out how to implement cookie part.

    Any suggestions or scripts will be appreciated. Thanks.

    Jason

  2. #2
    Join Date
    Dec 2005
    Location
    Moscow, Russia
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This structure of page made by modules usually, for example, in CMS Mambo, phpNuke, etc. . Transition between pages with saving of modules already implemented with it. Manually it may be saved in cookie or in parameter of URL (simply). In your shop you use cookie in any case, but you may select any way.

    For example,

    Code:
    <a href=mainScript.php?select=leftSide>Select left border page</a> in page.
    Script will send new page with fixed content of left border.

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
  •