I posted this last week on the asp forum and haven't had any response, so Ithought my I had posted in the wrong forum. If this I'm wrong, I apologise sincerely. Please help me with this.
I'm designing an online form for a client using javascript and vbscript. After a user has filled in, the form must be converted to pdf (I'm using ABCpdf5). The problem I have is that the form can be quite large and I get an error (MSXML3.DLL: System error: -2146697211.) when trying to send it to the page that actually generates the pdf. My code looks like this:
Expand|Select|Wrap|Line Numbers
- function BuildPDF()
- {
- window.status = "Generating PDF..."
- var oXMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
- var s = "<HTML>" + divFResults.innerHTML + "</HTML>";
- var sURL = ".//IncludeFiles/BuildPDF.asp?s1=" + s;
- oXMLHTTP.open("POST", sURL, false);
- oXMLHTTP.send();
- var tableout = oXMLHTTP.responseText;
- oXMLHTTP.abort();
- oXMLHTTP = null;
- var oData = new ActiveXObject("Microsoft.XMLDOM");
- oData.async="false";
- var nodes = new ActiveXObject("Microsoft.XMLDOM");
- nodes.async="false";
- oData.loadXML(tableout);
- var GenData = oData.getElementsByTagName("xml");
- if(GenData.length==0) {
- alert("Unable generate PDF.");
- return (false);}
- nodes.loadXML(GenData.item(0).xml);
- var sDone = nodes.documentElement.selectSingleNode("/xml/done").text
- if (sDone != "1"){
- alert("Unable generate PDF.");
- return (false);}
- }
This code works on small when small amount of data is sent. Is there size limits to the amount of data that can be sent this way. If so could you please suggest any solutions or work arounds.
If this has already been covered on this forum, please accept my apologies for reposting. Please direct me to the solution.
Thanks.