Google Groups Home
Help | Sign in
ASP xml proxy
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rona  
View profile
 More options Sep 7 2008, 4:56 am
From: rona <aymensoly...@gmail.com>
Date: Sun, 7 Sep 2008 03:56:46 -0700 (PDT)
Local: Sun, Sep 7 2008 4:56 am
Subject: ASP xml proxy
HI i am still have a problem with retrieving data from geonames.org
i used XML ASP proxy named "proxy.asp"

<%
Dim strSite, strFile, strUrl
strSite = Request.QueryString("site")
strFile = Replace(Request.QueryString("file"), "_", "&")
Select Case strSite
Case "geonames"
strUrl = "http://ws.geonames.org/"
End Select
strFile = strUrl & strFile
Set objXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHttp.Open "GET", strFile, False
objXMLHttp.Send ""
Response.Write objXMLHttp.responseText
Set objXMLHttp = Nothing
%>

and the function i used to call is

GDownloadUrl("http://localhost/proxy.asp?
site=geonames&file=findNearByWeatherJSON?lat="+point.y+"&lng="+point.x
+"", function(data2){
                var jsonData = eval('(' + data2 + ')');

Any ideas..Regards


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile
(1 user)  More options Sep 7 2008, 7:20 am
From: bratliff <bratl...@umich.edu>
Date: Sun, 7 Sep 2008 06:20:22 -0700 (PDT)
Local: Sun, Sep 7 2008 7:20 am
Subject: Re: ASP xml proxy

rona wrote:
> HI i am still have a problem with retrieving data from geonames.org
> i used XML ASP proxy named "proxy.asp"

Rona, you are not listening.  Stop beating your head against the
wall.  JSON & XML are entirely different animals.  You are trying to
retrieve JSON results with XML access methods.  JSON is JAVASCRIPT.
XML is structured text.  JSON uses dynamic SCRIPT tags WITHOUT a
proxy.  XML uses either XMLHttpRequest or its sugar coated substitute
GDownloadUrl WITH a proxy.  www.geonames.org supports both except in a
very limited number of cases.

If you try to fetch JSON formatted results with XML methods, it will
fail.  If you try to fetch XML formatted results with JSON methods, it
will fail.  JSON is easy.  XML is difficult.  If you show some
willingness to try to understand the difference, people will help
you.  If you just stubbornly post the same clueless plea, noone will
help you.  You may be in the wrong profession.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rona  
View profile
 More options Sep 7 2008, 7:36 am
From: rona <aymensoly...@gmail.com>
Date: Sun, 7 Sep 2008 06:36:24 -0700 (PDT)
Local: Sun, Sep 7 2008 7:36 am
Subject: Re: ASP xml proxy
Ok i thanks for ur advice ad i am starting to work with json ..the
problem that i lost with different options ..that is the problem

Thanks for ur advice

On Sep 7, 3:20 pm, bratliff <bratl...@umich.edu> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rona  
View profile
 More options Sep 7 2008, 7:56 am
From: rona <aymensoly...@gmail.com>
Date: Sun, 7 Sep 2008 06:56:07 -0700 (PDT)
Local: Sun, Sep 7 2008 7:56 am
Subject: Re: ASP xml proxy
ok i am start using JSON

function importMarkers8(){
var point = marker.getPoint();
request = 'http://ws.geonames.org/findNearByWeatherJSON?lat='+point.y
+'&lng='+point.x+'&callback=getLocation';

}

function getLocation(jData) {
if (jData == null) {alert("sdasd");}
var html = '';
  var geonames = jData.geonames;
  for (i=0;i< geonames.length;i++) {
 var name = geonames[i];
  alert("dfsdf");
     html = html + '<a href="javascript:center(' + name.lat +',' +
name.lng + ');">' + name.name + '</a><br>';
  }
  document.getElementById('side_bar').innerHTML = html;

}

but didnt got any results..
is this the right way to work with json

RegARDS
On Sep 7, 3:36 pm, rona <aymensoly...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rona  
View profile
(1 user)  More options Sep 7 2008, 1:31 pm
From: rona <aymensoly...@gmail.com>
Date: Sun, 7 Sep 2008 12:31:34 -0700 (PDT)
Local: Sun, Sep 7 2008 1:31 pm
Subject: Re: ASP xml proxy
any heelp plz

On Sep 7, 4:56 pm, rona <aymensoly...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rossko  
View profile
 More options Sep 7 2008, 2:02 pm
From: Rossko <ros...@culzean.clara.co.uk>
Date: Sun, 7 Sep 2008 13:02:09 -0700 (PDT)
Local: Sun, Sep 7 2008 2:02 pm
Subject: Re: ASP xml proxy

> request = 'http://ws.geonames.org/findNearByWeatherJSON?lat='+point.y
> +'&lng='+point.x+'&callback=getLocation';

Well, that's a nice string variable; but you don't do anything with
it.
You need to do something else to make your script go off and fetch the
data from that URL, a substitute for GDownloadUrl if you like.

There's more than one technique, but here's an example
    http://www.php-editors.com/articles/php-json.php
which creates <script> tags on the fly.

cheers, Ross K


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile
(1 user)  More options Sep 9 2008, 7:51 am
From: bratliff <bratl...@umich.edu>
Date: Tue, 9 Sep 2008 06:51:51 -0700 (PDT)
Local: Tues, Sep 9 2008 7:51 am
Subject: Re: ASP xml proxy
On Sep 7, 7:31 pm, rona <aymensoly...@gmail.com> wrote:

> any heelp plz

I built an example for you:

    www.polyarc.us/geonames

It is stripped to the bone demonstrating just the JSON interface.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google