Issue on passing a checkbox set to an AppEngine script through jQuery Ajax/Json
        Posted  
        
            by Jorge
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jorge
        
        
        
        Published on 2010-04-29T02:37:06Z
        Indexed on 
            2010/04/29
            3:37 UTC
        
        
        Read the original article
        Hit count: 383
        
I have a set of checkboxes with multiple choice allowed. I parse the set this way:
if ($("input[name='route_day']:checked").length > 0) {
    $("input[name='route_day']:checked").each(function(){
     if(this.value != null)
  route_days_hook.push(this.value); 
  });
  dataTrap.route_days = $.JSON.encode(route_days_hook);
}
...and pull the whole dataTrap to an AppEngine Python script via jQuery ajax. However, the Python script just bugs. If i change dataTrap.route_days value to a string instead of the JSON encoded object, everything works fine.
My question is: how can i pass a checkbox set to the script using Ajax and still be able to iterate over it on the script?
© Stack Overflow or respective owner