Cookie Reading on Page Load

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
Ineffable
Sr. Propeller Head
Posts: 148
Joined: Mon Jan 15, 2007 3:08 pm
Location: Bay Area, CA

Cookie Reading on Page Load

Post by Ineffable »

I am trying to read a user's cookie on page load. A user must login first before using the help system. The server issues a cookie, and in this cookie is a unique session ID.

My help system shows a variety of parts. Some of these parts can be ordered via another website on the same domain. Currently, a user must find the part (and accompanying part number) in my help system, transcribe/copy/memorize the part number, then add it to cart in the main system. I am trying to implement an Add To Cart button on my help system. This would add the item to the cart from my help system to the main system.

So far, I've been able to achieve limited functionality. I have placed a cart icon next to parts that can be ordered. However, I have to manually create a special URL. This URL passes the following information to the main system: 1) User ID (usr), 2) Item Number (seg), and 3) Quantity (qt). (Items in parentheses refer to the URL below.)

To make it as simple as possible, I can manually enter the item number and item quantity into the URL. (Here is a sample of a working URL: http://itb.turbomaster.com/bb/SCBBBServ ... ?usr=60865
&seg1=9712-0154&qt=1
)

As stated, the Item Number and Quantity can be hardcoded in and forgotten. However, the User ID is going to be the tricky part. What I was going for is the ability for Flare to craft the URL on the fly (on page load is my first guess), then insert the User ID into the URL. I have been scouring javascript websites for this type of functionality; I have found some solutions but, again, Flare is the gatekeeper. I don't know if there is any onPageLoad capabilities that would allow portions of the XML/HTML in a Flare page to have a variable inserted/rewritten.

Insights? Thanks!
Post Reply