AJAX Forums

Getting info from the http.responseText/XML to the web page

This is a discussion on Getting info from the http.responseText/XML to the web page within the JavaScript forums, part of the Beginners AJAX category; I'm using Ajax with a php proxy to make a query to a webservice and get the data back to a web page (and ultimately into a database). "getVIN()" is ...

Go Back   AJAX Forums > Beginners AJAX > JavaScript

AJAX Made Easy


JavaScript JavaScript is the name of Netscape Communications Corporation's and now the Mozilla Foundation's implementation of the ECMAScript standard, a scripting language based on the concept of prototype-based programming. The language is best known for its use in websites (as client-side JavaScript), but is also used to enable scripting access to objects embedded in other applications.

Reply

 

LinkBack Thread Tools Display Modes
Old 01-20-2010, 01:30 PM   #1 (permalink)
Junior Member
 
Join Date: Jan 2010
Posts: 2
Rep Power: 0
ajaxWanderer is on a distinguished road
Getting info from the http.responseText/XML to the web page

I'm using Ajax with a php proxy to make a query to a webservice and get the data back to a web page (and ultimately into a database).

"getVIN()" is my function to send the XMLHttpRequest to the php proxy. Then "onreadystatechange" uses "useVIN." It's this function that I'm having my problems with.
Code:
function  useVIN()
{
	if (http.readyState == 4) 
	{
		if (http.status == 200)
		{ 
			var respText = http.responseText;
			document.getElementById("vehInfo").innerHTML = respText;
			
			alert("The VIN query was successful.");
		}
	}
}
If I run the code with Firebug I see the responseText in the Watch window when I get to the "document.getElement..." line. But nothing gets printed in the vehInfo. I've also tried a bunch of ways to extract using the http.responseXML, but those don't work either. If I can't even print the http.responseText to the web page, there's something happening that I can't figure out.
ajaxWanderer is offline   Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
IE returns null responseText, Firefox and Safari do not puladancer JavaScript 0 06-18-2009 06:04 PM
HTTP web service carlos martin d AJAX Web Services 1 12-24-2008 02:08 AM
auto-popup info button MMC25 AJAX Help 0 08-14-2007 04:42 AM
need help getting info from a HTML form to a PHP file? Jason The Wizard XHTML and CSS 1 06-05-2007 11:24 AM
Beyond HTTP microbee AJAX Help 0 01-31-2007 06:34 PM


All times are GMT -4. The time now is 12:09 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright ©2006 - 2009, AJAXwith.com