I doing an "add this page" function on the site I am working on.  We tried to 
do this as a form submission, but for some bizarro world reason, the hidden 
field witht he URL was not getting passed.  So our next step was to set a 
cookie as a flag.  Here is what is happenbing...

You click on add this page...it invokes a javascript function that sets a 
cookie (named http_ref)with the value of yes and then submits the form.

After the form submission, CF cannot see the cookie  until you click on a link 
(any link...doesn't matter).  

After you click on the link, CF sees the cookie and runs the code to add 
thelink to the db.

Is there some reason why CF is unable to see the cookie set by javascript?  I 
know the cookie has been set...if I do an alert(document.cookie);...the cookie 
and proper value is there, but if I do an alert('#cookie.http_ref#)...it 
returns a differnt value (usually false).  CFDUMP returns "[empty string]".  

What am I missing here?

Eric

here is the function that is being called when you click on add this page...

function addPagetoList() {
        
        document.cookie='http_ref=true;path=/';
        alert(document.cookie);
        document.add_page.submit();
        return true;
        }

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250769
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to