Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Deepika Harida...
(321)
SweetGhost
(212)
David Billa
(141)
Last 7 Days
Arun Jacob
(1406)
amarababu nara...
(1301)
Deepika Harida...
(1194)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
what is the answer?
Posted Date:
29 Aug 2008
Total Responses:
1
Posted By:
Ravi Kiran.T
Member Level:
Gold
Points
: 1
function getXHRObject(){
var req = null;
if(window.XMLHttpRequest){
req = new XMLHttpRequest();
}
else if(window.ActiveXObject){
req = new ActiveXObject("Microsoft.XMLHTTP");
}
return req;
}
function performRequest(){
var xhr = getXHRObject();
xhr.open("GET","test.xml",false);
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
alert(xhr.responseXML);
}
}
xhr.send(null);
}
Assume test.xml is properly formed and sent with the correct mime type.
Referring to the code and statement above, which one of the following occurs when the method performRequest is executed in Microsoft IE?
Options:
Choice 1
It throws an error since you cannot request an xml file directly.
Choice 2
An alert statement appears with [object] in it.(checked)
Choice 3
An alert statement appears with the XML file's text in it.
Choice 4
No alert appears since requesting a file returns a status code of zero.
Choice 5
No alert appears since onreadystatechange does not execute.
Responses
Author:
Pradeep Kumar Chaudhary
29 Aug 2008
Member Level:
Gold
Rating:
Points
: 2
Choice 4
No alert appears since requesting a file returns a status code of zero.
This is the right answer.
Post Reply
You must
Sign In
to post a response.
Next :
Athira appukuttan ????
Previous :
Interview Question
Return to Discussion Forum
Post New Message
Category:
ASP.NET
Related Messages
Validation Controls
no of click on advertisement in asp.net application
Please Please help.................. tooo urgent
Please tell me .Net interview Questions for 2+ Years Exp
To upload Documents like(doc,pdf,etc) to file system
dotNet Slackers
BizTalk Adaptors
Web Design
SPOC
Contact Us
Privacy Policy
Terms Of Use