468,110 Members | 1,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

Script required for Switching Page Layouts

Switching Page Layouts!!!

Does anyone have any idea how to create a script for Switching Page Layouts.
I know how to create one for Style Sheet Switcher (http://www.dynamicdrive.com/dynamici...etswitcher.htm) but not for PAGE layouts.

I mean I can make a menu to switch between a Wide Page Layout and Narrow Page Layout but I want that to be stored into a cookiee so that will show up when the visitor check back again.

THANK YOU!!!
May 18 '07 #1
4 1179
pbmods
5,821 Expert 4TB
Does anyone have any idea how to create a script for Switching Page Layouts.

I know how to create one for Style Sheet Switcher (http://www.dynamicdrive.com/dynamici...etswitcher.htm) but not for PAGE layouts.

I mean I can make a menu to switch between a Wide Page Layout and Narrow Page Layout but I want that to be stored into a cookiee so that will show up when the visitor check back again.
The easiest way I can think of doing this would be to use a style sheet switcher, but instead of colors and whatnot, you'd switch css files that define widths for different elements.
May 19 '07 #2
The easiest way I can think of doing this would be to use a style sheet switcher, but instead of colors and whatnot, you'd switch css files that define widths for different elements.
Thanks for the feedback and I believe your solution will work for my part.
However when user changes the page layout into WIDE layout I have to send them to a different page first (index2.html) then in there have the stylesheets like you said.
------------------------

I dont know if I'm asking much but I would really apriciate if you(pbmods) or someone else can help me with the other problem:

I want to be able to have control over which sites I dont want to show full url path but show only the base url.
(I tried using frames but didnt like it)

If you type on the web bar: yahoo.com/ it will return to http://www.yahoo.com/
May 19 '07 #3
Banfa
9,033 Expert Mod 8TB
In future no need for all the * in your thread title. Just make it a meaningful synopsis of your problem please.
May 20 '07 #4
pbmods
5,821 Expert 4TB
Thanks for the feedback and I believe your solution will work for my part.
However when user changes the page layout into WIDE layout I have to send them to a different page first (index2.html) then in there have the stylesheets like you said.
Hm.

The only solution that I've been able to get working for something like that is to use an AJAX call to load the page content, similar to this:

Expand|Select|Wrap|Line Numbers
  1.     <body>
  2.         <div id="theContent">
  3.         </div>
  4.     </body>
  5.  
Expand|Select|Wrap|Line Numbers
  1. function changeLayout(sourceFile) {
  2.     yourFavoriteAjaxFunction(sourceFile, function(response) {
  3.         document.getElementById('theContent').innerHTML = response.responseText;
  4.     });
  5. }
  6.  
May 21 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Web Master | last post: by
179 posts views Thread by SoloCDM | last post: by
8 posts views Thread by Sergei | last post: by
3 posts views Thread by Simon Verona | last post: by
2 posts views Thread by Susanne West | last post: by
3 posts views Thread by traceable1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.