Cold Fusion Session Issues in IE

I have a CF page that increments a session when a "More results" link is clicked on the page. When I click it, an AJAX call is made to a page that returns more data to show.

What's happening is that in all browsers, the first time I click the link, new product is appended to the initial set of product.

But, IN IE ONLY, when I click it the second time to load more, the session variable that's being used doesn't get incremented. So, what's happening is the same set of data keeps getting added to the page over and over again. In ALL OTHER BROWSERS, it functions as it should.

I've exhausted every possibility I can think of, and I have no idea why IE would do this.

Anyone have any thoughts?

Here's the javascript call that's appending the data to the page from "moreResults.cfm"
  function loadmoreproducts(){
   var version = <cfoutput>#randRange(1000,100000)#</cfoutput>;
   var thisURL = '/Products/moreResults.cfm?version=' + version;
   $.get(thisURL,{},function(data){
    $(".scrollContainer").append(data);
       if(!data){
        $(".loadMore").hide();
        alert("No More Results.");
       }
    })
  }

Open in new window


Here's the moreResults.cfm code. Note that in line 38, I'm outputting the "startRow" session value to screen. In all browsers, this increments every time. In IE, it's value is unchanged no matter how many times the link is clicked.
<cfsetting showdebugoutput="no" />
<cfsilent>
 <cfparam name="session.startRow" default="0" />
 <cfparam name="url.sort" default="0" />
 <cfswitch expression="#url.sort#">
  <cfcase value="0"><cfset orderByField = "displayOrder" /></cfcase> 
  <cfcase value="1"><cfset orderByField = "catalogname" /></cfcase>
  <cfcase value="2"><cfset orderByField = "introDate DESC" /></cfcase>
  <cfcase value="3"><cfset orderByField = "totalBulbs" /></cfcase>
  <cfcase value="4"><cfset orderByField = "distributorNetPrice" /></cfcase>
  <cfcase value="5"><cfset orderByField = "distributorNetPrice DESC" /></cfcase>
  <cfdefaultcase><cfset orderByField = "displayOrder" /></cfdefaultcase>
 </cfswitch>
 <cfset SESSION.startRow = Int(SESSION.startRow) + 52 />
 <cfset myStartRow = SESSION.startRow />
 <cfset myEndRow = Int(myStartRow) + 51 />
 <cfset myProducts = "" />
 <cfset moreContent = "" />
 <cfif isDefined('session.productSearchList')>
  <cfloop from="#myStartRow#" to="#myEndRow#" index="i">
   <cfif i lte listLen(session.productSearchList)>
    <cfset myProducts = listAppend(myProducts,listGetAt(session.productSearchList,i)) />
   </cfif>
  </cfloop>
 </cfif>
 <cfif myProducts is not "">
  <cfquery name="request.getProductDetails" dbtype="query">
   Select *
     from Application.webProducts
    Where productID in (#myProducts#)
    Order by #orderByField#
  </cfquery>
  <cfsaveContent variable="moreContent">
   <cfoutput query="request.getProductDetails">
    <cfset productID = request.getProductDetails.productID />
    <cfinclude template="#VTappRoot#products/productPreview.cfm">
   </cfoutput>
   <div class="left"><cfoutput>#session.startRow#</cfoutput></div>
  </cfsaveContent>
 </cfif>
</cfsilent>
<cfoutput>#moreContent#</cfoutput>

Open in new window


I've tried turning on "Use J2EE session variables". I've also toggled "HTTPOnly" and "Secure Cookie" via the administrator with no luck.

Sessions are used elsewhere on the site without issue. I wonder if it has something to do with the INTEGER?

Also, I inherited this code (and I'm not even a CF developer), so my knowledge of this is VERY minimal.
infotechelgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gdemariaCommented:
Sorry, I don't have an answer, but I would be curious to see what value the moreResults has for the session ID.   Is there a way for testing you can include the session ID in your results and compare it to the session ID of the page... let's see if the ajax call and the main page have different session IDs
0
infotechelgAuthor Commented:
I've requested that this question be deleted for the following reason:

I finally figured it out. It had nothing to do with ColdFusion, but how the JavaScript was calling the code. I fixed that and it worked.

Sorry for wasting everyone's time on this one.
0
gdemariaCommented:
It may be helpful if you posted the answer, others may like to know for the knowledge base.  Then you can accept your own answer as the solution.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

infotechelgAuthor Commented:
Sure. I changed this:

   $.get(thisURL,{},function(data){
    $(".scrollContainer").append(data);
       if(!data){
        $(".loadMore").hide();
        alert("No More Results.");
       }
    })

Open in new window

To this:
	   $.get(thisURL,{},function(data)
	   {
		   if (data)
		   {
		   	$(".scrollContainer").append(data)
		   }
		   else
		   {
			$(".loadMore").hide();
			alert("No More Results.");
		   }
	   });

Open in new window

No idea why that fixed it, but it did. I hate inheriting code :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
infotechelgAuthor Commented:
I decided not to close the question, but showcase the answer even though it wasn't CF related.
0
infotechelgAuthor Commented:
Discovered the issue on my own.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.