Ask a Question related to Macromedia ColdFusion, Design and Development.
-
_Roudh #1
Problems with radio buttons/cookies
I'm re-posting this message because I'm not sure why it was ignored. Does no
one know the answer, or do I need to give you more of my code to check?
I'm sorry about re-posting.
Hi,
I've been trying to get my head aorund these blasted things, but I just can't
seem to. I'm sorry to just come here and expect you guys to answer, but I do
honestly try to understand it before coming here, and clogging the forums up
with basic questions. I'm working with Web Monkey articles, and they don't
explain how to use cookies too well...
I have some radio buttons (attatched), a process that should set cookies
(attatched), and something to tell me wether it has (attatched).
All the different parts of the attatched code are in seperate templates.
It will output the session, but never outputs the cookies - Always come up
with cookie undefined. :/
What am I doing wrong?
I'm sure I don't have the CFIF's right for the radio buttons. Shoudl they be
"1" "#1#" or just 1?
SIGH
Again, I apologise for this basic question.
Any help would be much appreciated,
JR
<!-- RADIO BUTTONS -->
Remember my Username <cfinput type="radio" value="1" required="no"
checked="yes" name="remember"><br>
Remember my Username and password <cfinput type="radio" value="2"
required="no" checked="no" name="remember"><br>
Always ask for my Username and password <cfinput type="radio" value="0"
required="no" checked="no" name="remember"><br>
<!-- PROCESS -->
<cfif 1=("form.remember")>
<cfcookie name="UserName" value="#GetUser.UserName#" Expires="NEVER">
</cfif>
<cfif 2=("form.remember")>
<cfcookie name="UserName" value="#GetUser.UserName#" Expires="NEVER">
<cfcookie name="pass" value="#GetUser.password#" expires="never">
</cfif>
<cfif 0=("form.remember")>
</cfif>
<!-- OUTPUT -->
<cfoutput>#Session.username#</cfoutput>
<cfoutput>#Cookie.username#</cfoutput>
<cfoutput>#Cookie.pass#</cfoutput>
_Roudh Guest
-
Radio Buttons
hi, can you let me know how to clear a radio button when the screen is loaded up again -
Flash MX 2004: Making radio buttons without using the radio buttoncomponent
Hello Can anyway suggest a good guide for making radio buttons without the radio button component? I'm new to Flash, but I've gotten to the point... -
XML into radio buttons
Hi, I am trying to attachMovie an XML file into a list radio buttons. Can anybody show me a clue on how to do that? Any comment, code, web site... -
Radio buttons help
Try Using The Following: radioButtonName.setStyle("color", 0xFFFFFF); Replace The "FFFFFF" With The Hex Code For Whatever Colour You Want. -
Using Radio Buttons?
Hi - how do I use radio buttons or check buttons so that only one of them at a time can be selected? I am using three but would like only one to... -
Fernis #2
Re: Problems with radio buttons/cookies
What's with that strange looking syntax <cfif 1=("form.remember")> anyway? I
don't have CF around right now, so I can't test if it would actually work...
CF uses "=" only when assigning something, not when comparing. Use IS or EQ.
Would <cfif form.remember IS 1> work?
Also, for shorter code, considering using <cfelseif> and <cfelse>, or
<cfswitch> and <cfcase> (and <cfdefaultcase>, which is always needed).
Fernis Guest



Reply With Quote

