473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

plain text retrieval from a webservice

function checkValues (Address) {

var values = "hello";
var urlItem = "http://rpc.geocoder.us/service/csv?address=";
urlItem += Address.value + "\n";
values = open (urlItem.toString ());
values=values.toString();
alert(values);
onLoad();
}
i am trying to get geocodes from geocoder.us which is returning plain
text, i need the values
returned and save them in a string, i tried using values =
open(urlItem.toString) and print values in an alert as you can see but
the alert prints "[object]", can anybody tell me how to get the result
in my string variable.

Basically this is the result i am getting, a window opens with this
text in it :
"38.898748,-77.037684,1600 Pennsylvania Ave NW,Washington,DC,20502"

now i want this result in a variable. Hope somebody can help me out
with this.

Thanks

Apr 6 '06 #1
1 1215
Hi,

temoor wrote:
function checkValues (Address) {

var values = "hello";
var urlItem = "http://rpc.geocoder.us/service/csv?address=";
urlItem += Address.value + "\n";
values = open (urlItem.toString ());
values=values.toString();
alert(values);
onLoad();
}
i am trying to get geocodes from geocoder.us which is returning plain
text, i need the values
returned and save them in a string, i tried using values =
open(urlItem.toString) and print values in an alert as you can see but
the alert prints "[object]", can anybody tell me how to get the result
in my string variable.

Basically this is the result i am getting, a window opens with this
text in it :
"38.898748,-77.037684,1600 Pennsylvania Ave NW,Washington,DC,20502"

now i want this result in a variable. Hope somebody can help me out
with this.

Thanks


The best object to use for this kind of "invisible" request is
XmlHttpRequest. It allows you to send a request and get the result in a
callback without having to open a new window or refresh the page.

See
http://jibbering.com/2002/4/httprequest.html
http://developer.apple.com/internet/...mlhttpreq.html

or generally Google for AJAX (asynchronous JavaScript and XML)

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 9 '06 #2

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

Similar topics

0
by: SoftComplete Development | last post by:
AlphaTIX is a powerful, fast, scalable and easy to use Full Text Indexing and Retrieval library that will completely satisfy your application's indexing and retrieval needs. AlphaTIX indexing...
10
by: Doug Bell | last post by:
Hi, I have an application that has a "Data Access Class" and "User Interface Class". It is for receiving Purchase Order data from one system and pushing processed transactions to another...
2
by: MLSrinivas | last post by:
Hi all, This is my first task with web services and quite new .NET. I tried a test webservice with "hello world" and "addnum" functions. When I tested them, they worked fine. Then in the same...
0
by: daryl | last post by:
I have a situation where a webservice has worked fine in a development environment, but when placed into production has stopped working (although at one time it was). Using WSE 2.0/DIME, we...
15
by: ritesh | last post by:
Hi, I'm working on a piece of code that - 1. has a list of text files 2. and needs to search for a particular expression in these files (this is being done on Linux using gcc 3.4.2) ...
0
by: JosAH | last post by:
Greetings, Introduction At the end of the last Compiler article part I stated that I wanted to write about text processing. I had no idea what exactly to talk about; until my wife commanded...
0
by: JosAH | last post by:
Greetings, Introduction Last week I started thinking about a text processing facility. I already found a substantial amount of text: a King James version of the bible. I'm going to use that...
0
by: JosAH | last post by:
Greetings, welcome back; above we discussed the peripherals of the Library class: loading and saving such an instantiation of it, the BookMark interface and then some. This part of the article...
6
by: Flyzone | last post by:
Hello, i'm trying to paste copied text from word into an input box. This text is saved into a oracle db and then used as text in another javascript. The problem is that using the saved text...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.