English 中文(简体)
通过j Query Ajax/Json将一套检查箱送给AppEngine书的问题
原标题:Issue on passing a checkbox set to an AppEngine script through jQuery Ajax/Json

我有一套有多种选择的检查箱。 我这样说:

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?

最佳回答

您:

 dataTrap.route_days = $.parseJSON(route_days_hook);

http://www.ohchr.org。

如果做这种工作的话,也许会因为你试图将一个阵列的物体改装为JSON而消失。

solution 相反。

问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签