<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>So, I'm a bit of a
javascript n00b. I've got a script that uses XMLHTTPRequest, though that part I
did not write. (contributed with permission) The firefox version works
fine with the sample data I'm using, but the IE version fails if the input
string is too long. </FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>here is the
XMLHTTPRequest part: </FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>function
ajaxme(url)<BR>{</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2> http_request =
false;</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2> if (window.XMLHttpRequest) {
// Mozilla,
Safari,...<BR>
http_request = new
XMLHttpRequest();<BR>
if (http_request.overrideMimeType)
{<BR>
http_request.overrideMimeType('text/xml');<BR>
}<BR> } else if (window.ActiveXObject)
{ // IE<BR>
try
{<BR>
http_request = new
ActiveXObject("Msxml2.XMLHTTP");<BR>
} catch (e)
{<BR>
try
{<BR>
http_request =
new<BR>ActiveXObject("Microsoft.XMLHTTP");<BR>
} catch (e)
{}<BR>
}<BR> }</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2> if (!http_request)
{<BR>
alert('Giving up :( Cannot create an XMLHTTP instance. Your browser may be too
old for this
application.');<BR>
return false;<BR>
}<BR> http_request.onreadystatechange
= hitMe;<BR> http_request.open('POST',
url, true);<BR>
http_request.send(null);<BR> }</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>and this is how I
call it in my page:</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2>ajaxme('notes.php?action=insnotedb&table='+tablename+'&note='+note+'&conn='+conn+'&datefield='+datefield+'&connid='+connid+'&data='+escape(data));</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>if data is long, IE
barfs on this line:</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2> http_request.open('POST', url,
true);</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>but firefox is fine
with long data. </FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>For short stuff (5
paragraphs?) they're both fine.</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>Using a form to POST
the same data (4x longer than is barfed on by IE) works in both browsers.
</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial size=2>Is there a
limitation to the size of http request IE will accept with XMLHTTP? Any idea
what's going on? </FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=530350119-29122006><FONT face=Arial
size=2>Matt</FONT></SPAN></DIV></BODY></HTML>