Distant_storm Posted March 18, 2008 Share Posted March 18, 2008 I have a index page. It checks to see if a cookie value exists if so then carry on doing what it does. I have a resolution page checker. It gets the users resolution then allows a link to the index page with that resolution sent via GET. which then creates a cookie to allow the index page to carry on usual This all works fine in Internet explorer However in firefox it just keeps re-directing back to the resolution page as if the cookie doesn't exist. Any ideas Its an SSL Server Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/ Share on other sites More sharing options...
megz90 Posted March 18, 2008 Share Posted March 18, 2008 silly question but have u checked if firefox is set to accept cookies ? (tools > options... > privacy) Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495047 Share on other sites More sharing options...
Distant_storm Posted March 18, 2008 Author Share Posted March 18, 2008 I don't know if its conflict with SSL or Firefox but Ajax requests don't work even when my code snifs the browser type and makes a request ocordingly. The cookie works fine on index page and yet on the page on the SSL server doesn't display the propper page? Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495146 Share on other sites More sharing options...
Distant_storm Posted March 18, 2008 Author Share Posted March 18, 2008 Ok now i have the cookie working but, The Ajax request works on on page but not another yet works on both in IE here is the code for the page that doesn't work... //Create a boolean variable to check for a valid Internet Explorer instance. var xmlhttp = false; //Check if we are using IE. try { //If the Javascript version is greater than 5. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { //If not, then use the older active x object. try { //If we are using MS. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { //Else we must be using a non-IE browser. xmlhttp = false; } } //If we are using a non-IE browser, create a javascript instance of the object. if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); } /* var xmlhttp; //If, the activexobject is available, we must be using IE. if (window.ActiveXObject){ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { //Else, we can use the native Javascript handler. xmlhttp = new XMLHttpRequest(); } */ function makerequest(serverPage, objID) { var obj = document.getElementById(objID); xmlhttp.open("GET", serverPage); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { obj.innerHTML = xmlhttp.responseText; } } xmlhttp.send(null); } function display_album_box() { var theselectbox = document.getElementById("album_selection").value; makerequest("album_viewing_page.php?album_ident=" + theselectbox,"album_viewer"); var thealbumbox = document.getElementById("album_viewer"); thealbumbox.style.visibility="visible"; } and then the page <div id=album_viewer></div><div class=main_mid><center><table width=100% align=center><tr><td colspan=2 class=title_bar width=100%> <center><font class=title_font>Album Browser</font></center></td></tr> <tr><td> </td></tr> <tr><td>Please choose an album $album_listing <input type=submit name=submit value=Go onclick=\"display_album_box()\"</td></tr></table></div>"; and the page being requested works fine Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495236 Share on other sites More sharing options...
Distant_storm Posted March 18, 2008 Author Share Posted March 18, 2008 *++_ Bump Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495416 Share on other sites More sharing options...
BlueSkyIS Posted March 19, 2008 Share Posted March 19, 2008 in firefox, have you checked for Javascript errors? Tools > Error Console for debugging ajax on the PHP side, i typically send an email to myself for debug. it can be a lot of emails. another alternative is to write debug to a log file on the server so you can see what (if anything) is going on in PHP. Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495421 Share on other sites More sharing options...
sKunKbad Posted March 19, 2008 Share Posted March 19, 2008 When doing ajax requests, you must make sure they are going to the same domain. www.yourdomain is a different domain than the non-www version according to FF. I had problems with this once, and this was the case. Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495424 Share on other sites More sharing options...
Distant_storm Posted March 19, 2008 Author Share Posted March 19, 2008 it is quoting that document.getElementById("album_selection").value has no properties Any ideas ? It also has 100 other errors but I think thats just firefox being particular as their mostly colour errors Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495425 Share on other sites More sharing options...
BlueSkyIS Posted March 19, 2008 Share Posted March 19, 2008 yes, click Clear to get rid of those errors so they don't confuse. also, make sure only Errors is selected so you don't have to see complaints about CSS, etc. is there a form element with it's id set to album_selection? Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495426 Share on other sites More sharing options...
Distant_storm Posted March 19, 2008 Author Share Posted March 19, 2008 Sorry yes... <select name=album_selection><option value=N>Choose</option> That is a dropdown box. When the button is pressed it goes to the javascript function stated above. This function attempts to get the value of the dropdown box option selected, which it does in IE say for example N like above. It then uses this in GET method making a request AJAX style to another php page which works fine in either IE or FIREFOX. Yet firefox is saying there is no property of album_selection ? Do i have to use another method to get the value of the drop down box ? Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-495433 Share on other sites More sharing options...
Distant_storm Posted March 19, 2008 Author Share Posted March 19, 2008 *+* Bump *+* Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-496419 Share on other sites More sharing options...
Distant_storm Posted March 24, 2008 Author Share Posted March 24, 2008 *_* BUMP *_* Quote Link to comment https://forums.phpfreaks.com/topic/96735-firefox-and-cookies-with-ssl/#findComment-499952 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.