macromedia.coldfusion.advanced_techniques
[Top] [All Lists]

Re: a CFC Guidance Plz?

Subject: Re: a CFC Guidance Plz?
From: "newchickinCF"
Date: Thu, 18 Dec 2008 14:44:10 +0000 UTC
Newsgroups: macromedia.coldfusion.advanced_techniques

Well I did something like this:

 <cfif Len(Form.question) LTE 2>
   Please Enter Question Name Please at least 3 characters.
   <cfelseif Len(form.ans1) LTE 1>
   You Did not Provide Answer 1 Value
   <cfelseif Len(form.ans2) LTE 1>
   You Did not Provide Answer 2 Value
   <cfelseif Len(form.ans3) LTE 1>
   You Did not Provide Answer 3 Value
   <cfelseif Len(form.ans4) LTE 1>
   You Did not Provide Answer 4 Value
   <cfelse>
   <cfinvoke component="cfc.poll" method="AddNewQuestion" 
question="#trim(form.question)#"/>
   <cfinvoke component="cfc.poll" method="getLastQuestion" 
returnvariable="gLastQuestion"/>
   <cfset s = structNew()>
   <cfset s.ans = arrayNew(1)>
   <cfset s.votes = arrayNew(1)>
   <cfparam name="s.ans[1]" default="#form.ans1#">
   <cfparam name="s.ans[2]" default="#form.ans2#">
   <cfparam name="s.ans[3]" default="#form.ans3#">
   <cfparam name="s.ans[4]" default="#form.ans4#">
   <cfparam name="s.votes[1]" default="0">
   <cfparam name="s.votes[2]" default="0">
   <cfparam name="s.votes[3]" default="0">
   <cfparam name="s.votes[4]" default="0">

 but still did not worked.


<Prev in Thread] Current Thread [Next in Thread>