473,804 Members | 3,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"prototype. js" & responseXML

Doesn't "prototype. js" support the "responseXM L" property of the
XMLHttpRequest object?

var url = "test.jsp";
var pars = "";
var myAjax =
new Ajax.Request(ur l,
{method: 'get', parameters: pars,
onComplete: mycallback }
);

"test.jsp"
<%
String sXml;
sXml = "<?xml version='1.0' encoding='utf-8' ?>";
sXml += "<response> aaa</response>";
%>
<%=sXml%>

"callbackfuncti on"
function mycallback(req)
{
alert(req.respo nseText); // ok!
if (req.responseXM L == null)
alert("does not work!");
// req.responseXML seems to be null
}

Feb 2 '06 #1
2 6748
eschl said the following on 2/2/2006 7:53 AM:
Doesn't "prototype. js" support the "responseXM L" property of the
XMLHttpRequest object?


Why don't you ask the people who wrote it?

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 2 '06 #2
I seem to remember something about responseText being populated on
Content-type: text/html responses and responseXML being populated on
text/xml responses.

You can either set the content type from the server (php has a "header"
function) or you can override it at the client. See details at the
link. Please post back here if it worked for you. Also where is the
Ajax object defined?

http://developer.mozilla.org/en/docs...etting_Started

Feb 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7849
by: Derek Ross | last post by:
Hello, Say I have a server that's saving the CPU temperature to 'temperature.js' once a second. The contents of the file is one single line: var temperature = "35.5"; And it changes as the temperature changes.
5
3458
by: Charles Crume | last post by:
Hello all; I've been able to locate, and download, the source for "animate.js" from a number of web sites, but have not been able to find *any* documentation on this script. Does anyone have any docs, or point to where they are? (I've tried about a dozen different search term combinations on google -- but no joy!!) TIA
4
6456
by: Dmitry | last post by:
Hello, Sometimes on js code execution Mozilla 1.5 prints in JS concole the following error: "Error: fn is not defined" where "fn" is the function name surely defined _before_ the line that produces error. The fn body and error line both live in the same *.js file.
7
3292
by: RFS666 | last post by:
Hello, I would like to use variables with a type in jscript.NET. I declare them as follows: var x : double = 5.03; This doesn't work in my script, that I write to the page in codebehind with "registerClientScriptBlock" as follows: string script = "<script language=jscript>"; script += "function test()";
1
1298
by: drnicwilliams | last post by:
The Prototype library gives us the $() operation for converting a DOM element id into the DOM element: $('element-id'). It also appends a bunch of functions to the resulting object. Sometimes though, passing a string into the $() function doesn't read well; and only makes Javascript code harder to read. For example: $(window.button_list()).hide() Instead, it'd be nice to have normal chainability. I like the following syntax:...
0
3614
by: carllucas | last post by:
i'm using action script 1.0 I'm try to create a "class" using prototype. I then want to apply an onEnterFrame function on this new object. I can successfully create the object but I can't get the onEnterFrame function to work. The code is below. function vehicle() { this.v = {x:0, y:0}; this.a = {x:0, y:0}; } vehicle.prototype.onEnterFrame = function() { trace("Testing");
1
6011
by: santhoskumara | last post by:
suppose i have two javascript file, where my jsp page need both the .js file. how will i import to my page. whether i need to put a two script tag and mention the path value in the src attribute like this ex: <script src="/*.js"></script> <script src="/*.js"></script> while i go through in the web I found out a code :
9
2938
by: Mahernoz | last post by:
Hello Friends, The JavaScript File exmplmenu_var.js contains the code... (for the sake of brevity i am showing only that code which needs to be changed) I am actually developing a menu using JavaScript. I have used a readymade javascript and there are variables like...
3
7846
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript" src="funcs3.js"></script> ? And I need to use similarly multiple CSS:
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9569
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9130
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2975
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.