Internet Explorer url limit of 2083 characters breaks mxAjax.Data

100 views
Skip to first unread message

jrevoy

unread,
Oct 22, 2008, 1:55:49 AM10/22/08
to mxAjax
Hi,

I am using the following three functions (slightly simplified). I am
sure my coding is correct because everything works well in Firefox, up
to the latest version, but fails in all versions of Internet Explorer
when I have four or more records in the tableData array of objects.
This object is basically an array of objects, eg.

function tableDataRecords() {
var tableData = new Array();
tableData[0] = new Object();
tableData[0].rpr_yn = "1";
tableData[0].rpl_yn = "0";
tableData[0].status = "new";
tableData[0].id = "";
tableData[0].sequence_number = "0";
tableData[0].description = "a";
tableData[0].paint_hours = "";
tableData[0].rpr_hours = "";
tableData[0].rpl_hours = "";
tableData[0].mechanical_hours = "";
tableData[0].parts_amount = "";
tableData[0].sublet_amount = "";
return tableData;
}
function saveEstimate() {
new mxAjax.Data({
executeOnLoad:true,
paramFunction: saveEstimateParams,
postFunction: handleSaveEstimateData,
errorFunction: handleError
});

}
function saveEstimateParams(id) {
var tableData = tableDataRecords();
var estimateData = estimateFields();
oParam = new mxAjax.Param(url,{});
oParam.addCall( {"saveEstimateData" : {
"Estimate_Fields" : estimateData,
"Repair_Details" : tableData
}});
return oParam;
}

If I create four array records, I error out. The character length of
the http request is just over 2K when there are four records (plus all
of the information from the estimateData parameter. When there are
three records, all works correctly. I did a bit of searching and found
that ie has a limit of 2083 characters for its url.

Just wondering if anyone has heard about this and if there is a work
around?

James Holmes

unread,
Oct 22, 2008, 4:08:54 AM10/22/08
to mxa...@googlegroups.com
You need to make mxAjax use a POST instead of a GET.

I'll try to dig up the correct format for this.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/


2008/10/22 jrevoy wrote

jrevoy

unread,
Oct 22, 2008, 10:48:53 AM10/22/08
to mxAjax
Thanks James,

I found a solution.

oParam = new mxAjax.Param(url,{httpMethod:"post"});
oParam.addCall( {"saveEstimateData" : {
"Estimate_Fields" : estimateData,
"Repair_Details" : tableData
}});
that works great.

John
> > around?- Hide quoted text -
>
> - Show quoted text -

James Holmes

unread,
Oct 22, 2008, 9:37:45 PM10/22/08
to mxa...@googlegroups.com
Yes, that's the general idea and the format I was looking for, Glad you found it.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/


2008/10/22 jrevoy wrote

Reply all
Reply to author
Forward
0 new messages