p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Ajax ISBN: 978-0-471-77778-6 (http://p2p.wrox.com/forumdisplay.php?f=244)
-   -   Problem with zxml Library (http://p2p.wrox.com/showthread.php?t=62415)

anujrathi September 28th, 2007 01:09 AM

Problem with zxml Library
 
Hi Experts,

Till now, For Ajax call, I used Asp.Net ICallbackEventHandler interface to send asyns calls to the server. But with the help of this interface I can register only one callback function.

Now I am trying to use zxml Library to create xmlHttp object & send a request to another page async. But I am facing a big problem.

Now I want to get some message by which I can distingush the sucess/failure of my request. I have used Response.Write() method to write a custom message on that page(to which i am sending the request).
But the responseText method returns the whole HTML code.
Like::


Sucess

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
 TestPage
</title></head>
<body>
    <form name="form1" method="get" action="AddPrintoCart.aspx?allids=369%2c368%2c367% 2c366" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJODExMDE5NzY5ZGSrWezdPJN/yTtsRBY7Y1fbDoifnw==" />
</div>

<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
// -->
</script>


<script src="/PhotoValaFinal/WebResource.axd?d=zouDzaOaJwT8Tsbm8t9Jtw2&t=633198 613276718750" type="text/javascript"></script>

        <span id="lblResult"></span>

<div>

 <input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX" value="0" />
 <input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY" value="0" />
 <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
 <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
</div>

<script type="text/javascript">
<!--

theForm.oldSubmit = theForm.submit;
theForm.submit = WebForm_SaveScrollPositionSubmit;

theForm.oldOnSubmit = theForm.onsubmit;
theForm.onsubmit = WebForm_SaveScrollPositionOnSubmit;
// -->
</script>
</form>
</body>
</html>



Sucess is written by Response.write() method.
I want to get only Sucess/faliur Text.
I have also tried responseXml method.

Pls suggest me proper solution.

Regards,
Anuj Rathi
The responseText method of xmlHttpRequest

joefawcett September 28th, 2007 09:05 AM

Unless you have a definitive reason for doing it this way, which is going to be difficult, I would look at using Page Methods, there is an article that covers them here: http://msdn.microsoft.com/msdnmag/is...e/default.aspx

--

Joe (Microsoft MVP - XML)

tbatbaatar October 30th, 2007 12:37 PM

 HI experts

i use zxml.js script.

Before this script good work.

But today not work my web site (Firefox 2.0.0.8).

 good work IE.

 Not work Firefox


 Please help

my web site url www.zarmedee.mn please any link to click

ERROR FOUN : "An error occurred: Length Required"

Please help PLEASE PLEASE PLEASE



All times are GMT -4. The time now is 05:31 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.