Answered
CFC - URi too long when passing text string to CFC
I have a page that allows a user to save a large block of
text which is held within a <div> to the database without
reloading the page by way of cfajaxproxy and a cfc.
Upon clicking 'save' a javascript function pulls the block of text out of the div and saves it to a javascript string, which is then passed into a cfc by way of cfajaxproxy as a javascript function parameter. (ie. functionName(theTextBlockString);). This works just fine unless the text contained within that javascript string var gets too long and causes a URi too long message.
Viewing the request in firebug I can see that the cfc is called via a GET request, which causes all of my input parameters that I've placed in the function to be placed in a GET url string, so obviously when it is a long block of text the URL string gets too long and I get the URi too long message from the CFC.
What I'm trying to figure out is how on earth I can pass a large text string into the CFC without encountering this problem. Is there an alternative request method so that I don't have to use GET?
Thank you in advance!
Dave
Upon clicking 'save' a javascript function pulls the block of text out of the div and saves it to a javascript string, which is then passed into a cfc by way of cfajaxproxy as a javascript function parameter. (ie. functionName(theTextBlockString);). This works just fine unless the text contained within that javascript string var gets too long and causes a URi too long message.
Viewing the request in firebug I can see that the cfc is called via a GET request, which causes all of my input parameters that I've placed in the function to be placed in a GET url string, so obviously when it is a long block of text the URL string gets too long and I get the URi too long message from the CFC.
What I'm trying to figure out is how on earth I can pass a large text string into the CFC without encountering this problem. Is there an alternative request method so that I don't have to use GET?
Thank you in advance!
Dave

