maximum characters in serialize???

i have a page that contains 6 forms.  Each form has two memo boxes.  I noticed when too much data is entered in the memo box the $.get does not run correctly.  Is there a maximum number of characters allowed when passing to a $.get?

In the code below, savePMSurvey.asp will return the recordID of the newly added record.  When I get too many characters, it seems to return a  zero.

                 var formData = $('form').serialize();
                  $.get('savePMSurvey.asp',formData, function(data){
                        answerHeaderID = data;
                        $('#answerHeaderID').val(data);
                  }); //end get

                if (answerHeaderID == 0) {
                    alert("There was a problem saving the Survey.");
                    canContinue = 0;
                }

Open in new window

KCTechNetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
In IE 2083 characters, other browsers can take a lot more. But if you are trying to send lots of data then why not use POST?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian HansenCommented:
Following on from Gary's suggestion simply change your code to the following
var formData = $('form').serialize();
$.post('savePMSurvey.asp',formData, function(data){
    answerHeaderID = data;
    $('#answerHeaderID').val(data);
}); //end post

if (answerHeaderID == 0) {
    alert("There was a problem saving the Survey.");
    canContinue = 0;
}

Open in new window


Server side you would potentially need to change your code to retrieve the data as a post, but functionally the two calls are the same with the exception that post can handle more data.
0
KCTechNetAuthor Commented:
haven't done web (javascript/asp)  programming long.

so just change to $.post and leave all other code the same?  

then on the asp page change from programID = Request.QueryString("programID") to request.form("programID")?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

GaryCommented:
Basically yes.
0
KCTechNetAuthor Commented:
that sounds scary :)

Ok.  I will give it a shot and see what happens.

Thanks
0
KCTechNetAuthor Commented:
sweet.  It seems to have worked.

Thanks for pointing me to using Post instead of Get
0
KCTechNetAuthor Commented:
jullian,

somehow I missed your comment, but thanks also for the help.
0
Julian HansenCommented:
No problem - Gary actually answered the question - my post was just background.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.