Jump to content

rayfinkel2

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rayfinkel2's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Cool....I'm glad you found a solution that worked for you. Usually if I just do: setcookie( session_name() ,"",0,"/"); session_destroy(); that takes care of them, but I have seen some strange situations. If you think of any other suggestions for my problem, let me know.
  2. Thanks kratsg, I have actually spent the last few days playing with all of those settings and none of them seem to help. I have also tried replacing the sessions with cookies and the same thing happens. The session ID always stays the same, but I lose the variables in the sessions only in internet explorer and only if I add the variables into the session on the index.php file. Very weird.
  3. Hi again, Since we last talked, I have determined that if I remove the session from the index.php file, it works on all of the other pages. The weird thing is that if I am viewing the category pages on internet explorer and they are working, then I add the session to the index.php page, the category pages won't work anymore, even if I don't go to the index.php (home) page. The index.php page is also not included in the the category pages in any way, so I am having trouble figuring out how it can affect them. Any suggestions would be great. Sessions are passing perfectly between all other pages.
  4. If you would like me to print out my session dump for you, please let me know.
  5. Yandy.com has a feature that allows its users to scroll through all the products in a category by clicking the "previous" or "next" button above the product picture when you are viewing a product. If you go to the Yandy.com homepage and click on any of the "featured products", you will be able to scroll through each one by clicking the "previous" or "next" buttons above the main product picture. This feature seems to work very well on the index page. The way it works is when the query is made to select all the products in a category, an array is made of all the product's "product ID's" that were just queried. After the array is made, it is added to a session (I also tried cookies and had the same issue). Then, when a user selects a product to view, the product ID for the product they just selected is searched out in the array (session) and when found, tells the program which product comes prior and next to the current product. I have done extensive testing to make absolutely sure that the array is being created correctly and does exist in the session after the page is fully loaded (and it does). The problem is that when I click on a new category or product, sometimes the session changes or disappears. Here is what I have determined so far: 1. The problem does not occur in Firefox. It only appears to happen in Internet Explorer. 2. We are using a mod_rewrite in the .htaccess file that allows us to use static URL names for each of our products and categories. We seem to lose the session when switching between a URL that uses a different directory. Example: The session will exist while in http://www.yandy.com/Shopping/products/category_19.asp, but then is lost when switching to http://www.yandy.com/shoes.php. I am aware that sessions and cookies usually cannot be transferred between different directories, but no matter which product (or category) they click on, the code is always using the same php script at root level. 3. There is a session_start on the top of every page (I also tried it with If(!isset($_SESSION) and also If(session_id() == "") ) and have also tried a session_write_close at the bottom of every page (but removed it now). 4. Even though I lose the previous/next button array in the session after a page reload, the session_id always remains the same. 5. I have googled and tried every idea I have read without any luck.
  6. When I am moving through product pages with the next button, how do I figure out which value I am at within the array?
  7. Ok Tom. It took me a little bit, but I think I understand what you are saying. I should pass the prod_id and some part of the query that would recreate it in the products page (maybe the category_id or search term) and then recreate the query with a limit. Makes sense. I will try that, but if anyone else has an easier way, please let me know. Thanks Tom!
  8. Yeah Tom, that makes sense, but the query will change depending on what you searched for or what category you are in. My guess is that when you go to a category or do a search and then choose a product, it pulls in an array of all prod_id's in the category. Then it passes that array to the product page and uses it to determine the next or previous page. Does that sound right?
  9. They may not because I am giving you a direct link to the product. If you go to a category or do a search and then select a product, then they should work.
  10. Previous/Next Above Product Images - Pagination? -------------------------------------------------------------------------------- Hi, I am currently building a website and I want to figure out how the programmer added the previous and next buttons above the image on this page: http://www.yandy.com/Microfiber-Halter-Bandeau-Top-Pants.aspx When you click next, it goes to the next product in that category. I understand how pagination works, but am having trouble grasping how this programmer made this work. Any ideas? Thank You, Ray
  11. Well, after trying a million different things, I finally fixed this problem. To be completely honest, I don't know what I did that fixed it, but it is fixed now.
  12. Hi, I am trying to pass a variable into where I would getElementByID and it always says "document.getElementById(prodColorName) has no properties. I think I have tried everything. The problem seems to be occuring in function colorStateChanged in this line "document.getElementById(prodColorName).innerHTML = xmlHttp.responseText; " Here is the full code: function sizeGetColor(selectedSize,currentColor,prodID,setNumber) { var url="http://estrategize.mailwebsol.com/Yandy/setOptionAjax.php?prodID=" + prodID + "&size=" + selectedSize + "&action=sizeGetColor&currentColor=" + currentColor + "&setNumber=" + setNumber; number=setNumber xmlHttp=GetXmlHttpObject(colorStateChanged) xmlHttp.open("GET", url , true) xmlHttp.send(null) } function colorStateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { var prodColorName="prodColor"+number; document.getElementById(prodColorName).innerHTML = xmlHttp.responseText; } } function GetXmlHttpObject(handler) { var objXmlHttp=null if (navigator.userAgent.indexOf("Safari")>=0) { objXmlHttp=new XMLHttpRequest() objXmlHttp.onload=handler objXmlHttp.onerror=handler return objXmlHttp } if (navigator.userAgent.indexOf("Opera")>=0) { objXmlHttp=new XMLHttpRequest() objXmlHttp.onload=handler objXmlHttp.onerror=handler return objXmlHttp } if (navigator.userAgent.indexOf("MSIE")>=0) { var strName="Msxml2.XMLHTTP" if (navigator.appVersion.indexOf("MSIE 5.5")>=0) { strName="Microsoft.XMLHTTP" } try { objXmlHttp=new ActiveXObject(strName) objXmlHttp.onreadystatechange=handler return objXmlHttp } catch(e) { alert("Error. Scripting for ActiveX might be disabled") return } } if (navigator.userAgent.indexOf("Mozilla")>=0) { objXmlHttp=new XMLHttpRequest() objXmlHttp.onload=handler objXmlHttp.onerror=handler return objXmlHttp } }
  13. Well, I got the first part figured out, but now I can't get the getElementByID to use the variable I created. This is what I have: function sizeGetColor(selectedSize,currentColor,prodID,setNumber) { var url="http://estrategize.mailwebsol.com/Yandy/setOptionAjax.php?prodID=" + prodID + "&size=" + selectedSize + "&action=sizeGetColor&currentColor=" + currentColor + "&setNumber=" + setNumber; number=setNumber xmlHttp=GetXmlHttpObject(colorStateChanged) xmlHttp.open("GET", url , true) xmlHttp.send(null) } function colorStateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { var prodColorName="prodColor"+number; document.getElementById(prodColorName).innerHTML = xmlHttp.responseText; } } It always tries to getElementById with the word prodColorName instead of the Variable created Above. Any Suggestions?
×
×
  • 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.