I am trying to add an array to my form submission. Please note: I do not want to use ajax ... just a regular submit after adding this "uids" parameter.
$("#new_meeting").live("submit", function(){ var uids = []; $("span.receiver-name").each(function(){ var uid_name = $(this).attr("id"); var uid = uid_name.split("--")[0]; uids.push(uid); }) $("#new_meeting").append("&uids=" + uids); });
This does not work, as on the server side I do not see the uids parameter. There is one more thing that I tried looking at other posts in stackoverflow, but couldn't make it work either ... that's what ..
var input = $("<input>").attr("type", "hidden").attr("uids", "mydata").val(uids); $('#new_meeting').append($(input));
Has anyone done this? Thanks.
source share