Jump to content

style switcher ie8 bug?


jmillspaysbills

Recommended Posts

Hi Guys and Gals.  Let me first say how much I appreciate your help with past problems from searching this board.  I've been lurking about, but have never had a problem I couldn't find the answer to online.

 

This one may be pretty simple or it may be just completely impossible.  I have no idea.

 

I found a style switcher php script, that is super easy.  It uses cookes (i know, i know) you can view the page here:

 

http://64.39.65.107/home.php

 

We're using this style swicher to switch between styles so the users can find clues, once they do they'll get a coupon for a free drink.

 

(click the different buttons on the iphone)

 

In ie8, you can select one style initially, but it will not select a different style unless you clear your cookies.

 

Anyway, the script works great in ie6/7, firefox, safari, mac/pc, but NOT ie8. I'm completely dumbfounded.  I've asked some people that know about PHP and they say the script looks accurate. 

 

below is the code for the switcher.php

<?php
/* expire in 1 year */
setcookie("sitestyle", $_GET['set'], time()+31536000);
header("Location: /home.php");
echo $_SERVER[HTTP_REFERER] 
?>

 

 

below is the code on each page that will determine the style selected

 

<!-- sticky; will not change -->
<link href="/css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="/css/<?php echo (!$_COOKIE["sitestyle"])?'default':$_COOKIE["sitestyle"] ?>.css" />


<!-- alternative; optional -->
<link rel="alternate stylesheet" type="text/css" media="screen" title="knockoutPunch" href="/css/knockoutPunch.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="bayBreeze" href="/css/bayBreeze.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="painKiller" href="/css/painKiller.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="whiteRussian" href="/css/whiteRussian.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="margarita" href="/css/margarita.css" />

 

Like I said, I have absolutely no idea what could be causing this to not work in ie8.  Do you know of any bugs?  Is it something I can't fix?

 

Thanks in advance for all your help.  I really appreciate ANY input you can give me, however insignificant.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.