Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
sweetyp2005 #1
value of check box
I have checkbox as following
<INPUT TYPE="checkbox" NAME="BannerAds" VALUE="<b>Affiliate</b><br>Affilate">
<INPUT TYPE="checkbox" NAME="BannerAds" VALUE="<b>Visa</b><br>Visa">
<INPUT TYPE="checkbox" NAME="BannerAds" VALUE="<b>Free</b><br>Free">
<cfif #form.checkbox# is "<b>Affiliate</b><br>Affilate">
<cfdocument>
<cfoutput>#form.checkbox#</cfoutput>
</cfif>
but the cfif condition is not correct. How do i fix that?
sweetyp2005 Guest
-
Spell Check and Grammer Check
Hello, Does anybody know about some good spell checker/grammer checker for html/asp pages? Thank you, Regards, Raj. -
Turning off Check in / Check out feature
How can I turn off the check in / check out feature? Can't seem to find it in the Contribute HELP. Thanks! -
"loaner laptop" check-in/check-out program?
Hi Folks, I am looking for a PHP or PERL application that will enable end users to check-out and check-in loaner laptop computers for my firm. ... -
Check to see if Check Boxes are Checked
How do I check to see if a checked box is check on the following page? This is what I have. What am I doing wrong? <%If... -
Quick Mac Check? and anyone else who would like to check it too
http://jaschob.com/protoSite/index.html Hi All, Just finished up a prototype site design. I have tested this with winpxpro, EI6 & NN7. Once at... -
SteveBryant #2
Re: value of check box
Try this:
<cfif form.BannerAds is "<b>Affiliate</b><br>Affilate">
<cfdocument>
<cfoutput>#form.BannerAds#</cfoutput>
</cfif>
The name of the form field uses the name attribute.
SteveBryant Guest
-
BKBK #3
Re: value of check box
The value of a submitted checkbox is "on" or "".
<cfset bannerVal1 = "<b>Affiliate</b><br>Affilate"> <!--- Affiliate ? --->
<cfset bannerVal2 = "<b>visa</b><br>visa">
<cfset bannerVal3 = "<b>Free</b><br>Free">
<form>
<INPUT TYPE="checkbox" NAME="BannerAds1"> Affilate<br>
<INPUT TYPE="checkbox" NAME="BannerAds2"> Visa <br>
<INPUT TYPE="checkbox" NAME="BannerAds3"> Free
</form>
<cfif IsDefined("form.BannerAds1") and form.BannerAds1 is "on">
<cfdocument>
<cfoutput>#bannerVal1#</cfoutput>
</cfif>
<cfif IsDefined("form.BannerAds2") and form.BannerAds2 is "on">
<cfdocument>
<cfoutput>#bannerVal2#</cfoutput>
</cfif>
<cfif IsDefined("form.BannerAds3") and form.BannerAds3 is "on">
<cfdocument>
<cfoutput>#bannerVal3#</cfoutput>
</cfif>
If the user must make only one selection out of the three, then Radio buttons
will do a better job than checkboxes.
<input type="radio" value="<b>Affiliate</b><br>Affilate"
name="BannerAds">Affilate<br>
<input type="radio" value="<b>visa</b><br>visa" name="BannerAds">Visa<br>
<input type="radio" value="<b>Free</b><br>Free" name="BannerAds">Free
BKBK Guest
-
PaulKD #4
Re: value of check box
I've not used the cfdocument tag, but the reference manual states that format
is a required field.
You have no /cfdocument within the cfif block
You should pre-check one of the checkboxes or use a cfparam in your form
handler
Regards.
PaulKD Guest
-
BKBK #5
Re: value of check box
....format is a required parameter. You have no /cfdocument within the cfif block
Thanks for pointing out the oversight, PaulKD. I've made the correction.
BKBK Guest



Reply With Quote

