Problem with ColdFusion session vars with FireFox

I have an online data entry form which works fine in IE, but not in FireFox.  FireFox does not seem to recognise ColdFusion session variables.

I set up an ultra simple test and it doesn't work.  I have a form  - Test.cfm with this code
<CFSET session.MyDate=CreateODBCDate(Now())>
<CFLOCATION URL="Test2.cfm" addtoken="no">

Open in new window

Test2.cfm looks like this

Open in new window

When I run Test.cfm, as expected Test2.cfm opens and displays the date, but when I run the FireFox debugger it tells me
<h2>500 - Internal server error.</h2>
  <h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
<h1 id="textSection1" style="COLOR: black; FONT: 13pt/15pt verdana">
       Element MYDATE is undefined in SESSION. </h1>

Open in new window

This of course in the data entry form stops things from processing.  How do I fix this problem?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Session variables work by using cookies, cookies are written when the page is fully displayed.   So, by doing a CFLOCATION after setting a session variable for the first time, you are preventing the page from writing (by redirecting it to another page)  - so the session variable is never set.

Remove the CFLOCATION and try again.  IF that doesn't work right away, change the name of your CFAPPLICATION to clear things out and try it.
jdthedjAuthor Commented:
Thanks for the reply gdemaria - As I said, it was a simple test (too simple ;-) ).  I have tried again using a form with a submit button to post to the 2nd page and I still get the same result.
Ok, first be sure that your application.cfc file is setup to allow session variables.

Then test setting cookies, be sure your browser will set and retrieve cookies ... same kind of test you're doing with sessions.   Also try other session variable names such as just session.testme and such.

You can also try switching to jsession variables in the CFIDE administrator

One more check, look at your cookies, I have had situations where there were TWO sets of CFIDE cookies set at once, deleting these cookies and restarting the browser fixed the issue.. no idea how two sets of CFID and CFTOKEN cookies were set, but deleting them fixed the problem

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
jdthedjAuthor Commented:
Thanks gdemaria - You mentioned jsession variables and I read up about them and turned them on in the Administrator.  The problem has now gone away.
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.