i've got a php, form, javascript/ajax thing. trouble with sessions/cookies not being set in ie7 always.
session cookies are being set mainly with php's session() but there is one bit of js involved in dealing with setting cookies:
that's in an external js file, which is generally working fine in all browsers including ie7. the newSessionID variable is coming from this in the html:Code:var allcookies=document.cookie; var session=allcookies.indexOf("session="); if(session==-1){ //if no session cookie set document.cookie="session="+newSessionID+"; path=/"; allcookies=document.cookie; }
(the howfar.js code is the file the first bit of code above is in.)Code:<script type="text/javascript">newSessionID="899087bc1e9ce2f5943cc3d49fd32fa2"; form_page="where-we-are";</script> <script type="text/javascript" src="includes/howfar.js"></script>
so can anyone see anything wrong with that?
also, i've asked this on the php list but i'll pop it on the end here as well (it's semi php, semi js question) (this is trying to find out the source of the same problem as the above question is trying to fix):
on an ajax type of http request i'm setting a cookie using the php function session(). this works ok in other browsers but not ie7 (possibly other ie's). i found stated on various webpages (e.g. http://stackoverflow.com/questions/3...ernet-explorer ) that there's a problem with ajax and iframes and cookies. could this be related. to be honest i don't even know what an iframe is. is it an html element. if so i'm definitely not using an iframe.
thanks.








Bookmarks