Dwelling: Chasing My Own Tale  
Menu

This WeekArchivesHome
[an error occurred while processing this directive]

<< PreviousHome | Next >>

Choose For Yourself

After working out a particularly strange solution for a client's web publishing system mess, I decided that before the client's developers poured too much time into it, I really ought to figure out if the solution would actually work.

Essentially, what needs to happen is for JavaScript to control Server-Side Includes.

"But Ross!", you say. "SSI's are executed on the server, well before any JavaScript gets executed. Anything you do will require passing back a Post via a form, or at the least, a query string... right?"

Not quite. It turns out that SSIs can be used to parse the HTTP_COOKIE environment variable. Set this up with the right statements and the site should be able to make JavaScripts control the SSIs.

My demo? My own site of course: rossolson.com also known as ordersomewherechaos.com.

As of late last night, instead of the layout always changing every hour, you can now control the layout with a little pulldown menu in the navigation bar. The pulldown has a JavaScript call that sets a cookie and then reloads the page that it's on.

The code that I used to have simply rotating the layouts now looks to see if the cookie is set first. If it is, the layout is chosen appropriately. If it's not then it's a free for all and your get the layout you're given.

Ross : Link : Discussion Board


 

 

February 2004
smtwtfs
1234567
891011121314
15161718192021
22232425262728
29      
[Monthly Archives]

 

Please Note: If you have not found the entry you are looking for please read about how to find the one you want.

 

XML RSS Feed

February 2004
smtwtfs
1234567
891011121314
15161718192021
22232425262728
29      
[Monthly Archives]

Part of the OrderSomewhereChaos family of sites
[ Dwelling : Dwelling Archives : OrderSomewhereChaos ]

Powered by GreyMatter