p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 28th, 2007, 02:09 AM
Banned
Points: 344, Level: 6
Points: 344, Level: 6 Points: 344, Level: 6 Points: 344, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2006
Location: New Delhi,India.
Posts: 76
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to anujrathi Send a message via MSN to anujrathi Send a message via Yahoo to anujrathi Send a message via Skype™ to anujrathi
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old September 28th, 2007, 10:05 AM
joefawcett's Avatar
Wrox Author
Points: 8,994, Level: 40
Points: 8,994, Level: 40 Points: 8,994, Level: 40 Points: 8,994, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 2,922
Thanks: 0
Thanked 13 Times in 12 Posts
Default

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old October 30th, 2007, 01:37 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
zXML library errors, questions triptone BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 0 October 24th, 2008 06:44 AM
zxml.js library for firefox 3.0 manahual BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 August 13th, 2008 01:53 AM
Zxml.js and input radio problem tezro BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 December 8th, 2007 05:19 PM
problem with CImg library franco82 C++ Programming 0 December 1st, 2006 07:21 AM
zxml library keodark BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 February 14th, 2006 07:05 PM



All times are GMT -4. The time now is 07:47 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc