|
Posted by Frances on 01/16/07 17:13
Dear Jerry
Thanks for replying. Sorry to hear about your crystal ball :-)
I guess I was hoping to blame it on some error with IE6 session
handling, but it must be my fault then. This is my code:
In the template:
session_cache_limiter('none');
$_SESSION["allow_script"] = "allow_script";
In the external javascript file:
<?php
session_start();
if (isset($_SESSION["allow_script"]))
{
if($_SESSION["allow_script"] == "allow_script")
{
?>
javascript code here
<?
unset($_SESSION["allow_script"]);
}
}
else
{
header("HTTP/1.0 404 Not Found");
}
exit();
?>
I can use other PHP code in the external javascript file, so that is
not the problem. It appears to me that it does not like any reference
to the session. This is only a problem in IE6. I have tried it
without unsetting the variable at the end and also without exit(). No
joy.
Thanks so much for any pointers
Frances
Jerry Stuckle wrote:
> fmaxwell@gmail.com wrote:
> > Dear Group
> >
> > I have a very frustrating problem. I have been trying to make it more
> > difficult to access external javascript files by using PHP sessions.
> >
> > This works beautifully locally (both in IE6 and IE7) and online in IE7,
> > but frustratingly, online in IE6, the javascript does not render on the
> > page, unless you refresh the page.
> >
> > Is there something different about the way IE6 handles sessions? Why
> > would it work locally but not online?
> >
> > Any help would be very much appreciated.
> >
> > Thanks
> > Frances
> >
>
> Sorry, my crystal ball is broken today. We need more information - like
> maybe the code your using.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
[Back to original message]
|