Chris,
I'm not quite sure what error you are having (am I missing something from
the post???)...but if the problem is with the JavaScript alert not coming
up, try using ParameterExists(...) rather than IsDefined(...).
HTH,
David
------------------------------------
David Grabbe
Manager, Information Systems
Church of the Great God
[EMAIL PROTECTED]
http://www.cgg.org
-----Original Message-----
From: Chris Luksha [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 3:39 PM
To: CF-Talk
Subject: The darndest time w/ Cookies. Actually form checking.
I apologize if this ends up getting posted a couple times. I haven't seen
the first posting in over an hour and I got a bounceback message from the
second attempt. So here is the third...
I am having the hardest time setting a cookie. I think it is actually in
testing for the form field.
Simple login application.
-User comes to page
-gets authorized
-If "remember me" is checked, set a cookie
Here is the code for setting the cookie.
<CFIF get_user.recordcount>
<CFSET Session.current_user_id = get_user.userID>
<!--- If "Remember Me" was checked, set a cookie on user's computer w/ User
ID. --->
<CFIF IsDefined("form.rememberme") IS "Yes">
<SCRIPT TYPE="text/javascript"> alert("Hey set a cookie will you!")
</SCRIPT> ----For testing of course
<CFCOOKIE name="sID" value="#get_user.userID#" EXPIRES="NEVER">
</CFIF>
The form field looks like this....
<INPUT TYPE="checkbox" NAME="rememberme" VALUE="Yes"><FONT
face="Tahoma"> Remember Me</FONT>
I have tried everything I can think of. I have read 3 diferent examples of
this exact thing. Could it be that I am using the cf4.5 svr that comes w/
cfstudio, and not on a real live server? I know that some things do not
function properly on this version of the server software, but I don't know
which things.
Thanks
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists