PDA

View Full Version : Javascript for selective Includes? (for multiple department issue)



mgscom
01-09-2006, 11:48 PM
Hello,
I've had an idea on implementing what I posted in

http://www.dynamicdrive.com/forums/showthread.php?t=6961&highlight=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

12345c
01-10-2006, 01:01 PM
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,


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