bug-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-cgicc] cgicc bug?


From: perry
Subject: Re: [bug-cgicc] cgicc bug?
Date: Tue, 15 May 2007 13:16:37 -0700 (PDT)

Claudio and group, my apologies for what may be an ignorant question. I found
this thread by searching for
queryCheckbox(). I'm having trouble getting this function to return anything
but FALSE.
I'm not having trouble getting the other functions to work, albeit fighting
a learning curve.
My webpage has many checkboxes and many fields. I'm using dumpList() from
the tutorials
to dump the variable list. What I notice is that when a checkbox is not
checked, the variable
is not longer in the list. Either way, the result of the call to
queryCheckbox() returns a FALSE.
Below is a small code snippet. Not sure what is wrong, I presume it is
simpler than my cgiccmind
right now.
  char strig[20];
  string value, temp, temp1, temp2, temp3,temp4;
  int i;
  form_iterator name,stemp1, stemp2, stemp3,stemp4;



      for(i=0;i<MAX_FREQS;i++)
      {
            sprintf(strig,"LC_CHECK_BOX_%d",i+1);
            temp=strig;
            if(cgi.queryCheckbox(temp))
                  temp1="0";
            else 

temp1="1"; 

             fprintf(in,"temp1 %d %s\n",i+1,temp1.c_str());
      }



Thanks for your assistance in advance.



Claudio Alberto Andreoni wrote:
> 
> A friend of mine suggested that I had better NOT to follow the W3C HTML
> 4.0
> standard [setting the value of a checkbox (<input type="checkbox"
> name="cn" value="cv" />)]
> and just do: cgicc.queryCheckbox("cn");
> instead of: cgicc.queryCheckbox("cn"); string myvalue =
> cgicc.getElement("cn");
> So I found another way to add a text value to a checkbox.
> If not queried for values, the app works perfectly -breakdowns still
> happen if
> I try to get the value of a checkbox-
> 
> Congratulations for the cool APIs
>       Claudio A. Andreoni
> 
> 
> _______________________________________________
> bug-cgicc mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-cgicc
> 
> 

-- 
View this message in context: 
http://www.nabble.com/cgicc-bug--tf2143653.html#a10630279
Sent from the cgicc - Bugs mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]