开发者

question regarding serializeArray and passing into url

I am not totally familiar with javascript, jquery.

I am trying to do the following. Note a-f are names for the dropdown menus. Can someone help clarify? thanks

     var a_params = $("#a").serializeArray();
     var b开发者_开发问答_params = $("#b").serializeArray();
     var c_params = $("#c").serializeArray();
     var d_params = $("#d").serializeArray();
     var e_params = $("#e").serializeArray();
     var f_params = $("#f").serializeArray();

     params.push({ name: 'menu_mode', value: '2-1' });
     $.get("./scripts/model.cgi", a_params,b_params,c_params,d_params,e_params,f_params, function(data){
        $("#grapharea").html(data);
        $("#prog").html(" ");
     });

More Comments: in the cgi script i am dumping the inputs to see if i am receiving the values from the a-f_params but this isn't the case. Any ideas why?


You have to create 1 array(or jquery-object in this case) from all object's, and serialize this array.

$('#a,#b,#c,#d,#e,#f').serializeArray();

But this is only needed, if you dont want to serialize e.g. all input-fields.

Otherwise you can use simply

$('#form').serializeArray();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜