Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TOKENS in Multiple Cookie Files...

Status
Not open for further replies.

rheilman

Programmer
Dec 6, 2002
51
0
0
US
This may be of those problems that cannot be answered from any one platform as there are two types of code involved, but one of them is javascript, thus, I'll try here first.

Our Information Portal on the intranet is an interface produced with Cold Fusion code. This code calls upon existing HTML pages and displays them.

In some of the HTML pages, we want to jump directly to another of the pages without backtracking to the Cold Fusion interface. To accomplish this, I have added <form> buttons to link to the desired page.

Code:
<form>
   <input type = "button"
      Value = "Changes"
      name = "Changes"
      onClick = "memCookie();
         location.href =
            '[URL unfurl="true"]http://xxxx.xxx.xx.xxx.com/fold1/fold2/[/URL]
             pivot_wrapper.cfm?targetID=78';">
</form>

The href setting comes from some other Cold Fusion tags in the interface and has been working for the most part. Intermittently, it will kick the user back to the sign-in screen.

Based on the results below, I find that something in the button is producing a new cookie file without the userid stored. Names and values have been changed of

After logging into the interface the first time, the cookie file...

XXX9999999@XXXX.XXX.XX.XXX.COM

...contains three name/value pairs...

CFID 248621
CFTOKEN 26961242
IMI_USER_ID XXX9999999

After using one of my buttons, the filename above gets changed to...

XXX9999999@XXXX.XXX.XX.XXX[1]

...with identical contents. The second file...

XXX9999999@XXXX[2]

...contains only the first two name/value pairs, and the value half of the pairs is different. It appears to me that either the storing of filtering name/value pairs in a third file, or the jumping directly to another page via the button is producing a second "session(?)" cookie file. As this file does not contain the ID, the interface requests the user login again.

I'm seeking insight as to why it would write a second session cookie file. My memCookie()function produces a completely different cookie file so I'm assuming that the problem lies in the jumping directly to the desired page. The truly perplexing part of this is that it doesn't always kick the user out.

Any help is appreciated.

Thanks!
Ray <><

contains only two name/value pairs. The values for the first and second pairs are different than the file above, and the third pair is not there.

"I was going to change my shirt, but I changed my mind instead." - Winnie the Pooh
 
My Cold Fusion sources suggested that I use relative addressing on the location.href property in order to ensure that I was not jumping to different server domains in my page shifting process.

Code:
<form>
   <input type = "button"
      Value = "Changes"
      name = "Changes"
      onClick = "memCookie();
         location.href = pivot_wrapper.cfm?targetID=78';">
</form>

In my testing, so far, the problem has not reoccurred. Either way, the relative addressing seems a valid improvement.

Thanks!
Ray <><

"I was going to change my shirt, but I changed my mind instead." - Winnie the Pooh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top