I have a list which contains various docIds. When the information is to be submited, a JQuery function is called which then collects all of the list values. I then need these list values to be sent via Ajax to a classic ASP page where the values will be formatted and then sent back to the original page to then populate a textarea. Here is my JQuery code:
$("#create").click(function() {
var strDocIDs = $.map($('.doc_list:visible').find('li[value]'), function(li) { return $(li).attr("value") }).join(",");
alert(strDocIDs);
$.ajax({
type: "GET",
url: "newslettercreate_action.asp",
data: { strDocIDS: strDocIDs },
success: function(result) {
var newsletter_string = $(result);
$("#scratch").val(newsletter_string);
}
});
});
And my ASP code:
result = Request("strDocIDs")
The information that I get returned into my textarea is:
[object Object]
My form method is currently set to POST. And would it matter between my using a submit button vs a traditional button to trigger the function?