Debugging AJAX...
-
Hi, folks! Ok, here's the scene: I have an html page into which I want to put some data from an SQL database. The page uses the following code to do that:
var xmlDoc = new ActiveXObject("MSXML2.DomDocument.3.0"); xmlDoc.async=false; try { xmlDoc.load("DbInterface.asp?Method=QueryRecs&TheSN="+TheSN.value); } catch (e) { alert ("Error Loading XmlDoc: " + e.description); delete xmlDoc; return; }
Ok, now in DbInterface.asp I get and return the recordset by use of the following:var rs=Server.CreateObject("adodb.recordset"); rs.Open (sql,conn,adOpenKeyset); rs.Save (Response, adPersistXML); rs.close;
This all works quite well, but here's my question: I had once figured out how to have DbInterface.asp display the XML of the recordset instead of returning it to the calling page. This made it pretty easy to see if the recordset was correct. I thought I had just replaced the rs.Save call with Response.Write (rs) and using window.open instead of xmlDoc.Load in the calling page, but I get the following error:Response object, ASP 0185 (0x8002000E) A default property was not found for the object.
Is anyone out there able to jog my memory? TIA! [Edit] Oh, and is there a way to avoid the Confirm dialog when using Window.Close() ? [/Edit]'til next we type... HAVE FUN!! -- Jesse
-
Hi, folks! Ok, here's the scene: I have an html page into which I want to put some data from an SQL database. The page uses the following code to do that:
var xmlDoc = new ActiveXObject("MSXML2.DomDocument.3.0"); xmlDoc.async=false; try { xmlDoc.load("DbInterface.asp?Method=QueryRecs&TheSN="+TheSN.value); } catch (e) { alert ("Error Loading XmlDoc: " + e.description); delete xmlDoc; return; }
Ok, now in DbInterface.asp I get and return the recordset by use of the following:var rs=Server.CreateObject("adodb.recordset"); rs.Open (sql,conn,adOpenKeyset); rs.Save (Response, adPersistXML); rs.close;
This all works quite well, but here's my question: I had once figured out how to have DbInterface.asp display the XML of the recordset instead of returning it to the calling page. This made it pretty easy to see if the recordset was correct. I thought I had just replaced the rs.Save call with Response.Write (rs) and using window.open instead of xmlDoc.Load in the calling page, but I get the following error:Response object, ASP 0185 (0x8002000E) A default property was not found for the object.
Is anyone out there able to jog my memory? TIA! [Edit] Oh, and is there a way to avoid the Confirm dialog when using Window.Close() ? [/Edit]'til next we type... HAVE FUN!! -- Jesse