Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #8577

Re: Read url into a string?

From Zlatko Đurić <zladuric@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Read url into a string?
Date 2011-11-24 00:29 +0100
Organization Iskon Internet d.d.
Message-ID <jajvki$fvb$1@sunce.iskon.hr> (permalink)
References <a0faab1d-920c-4d58-bb9f-b382b0b4ce38@w3g2000vbw.googlegroups.com> <pmuqc7t8p6ees0qo6sh484mc2o7jvv4afj@4ax.com>

Show all headers | View raw


On 11/24/2011 12:00 AM, Gene Wirchenko wrote:

>       JavaScript is not Java.  Try posting to a Java newsgroup.

Alternatively, the OP can try with JavaScript.

Maybe:

function getJSONfromUrl(url) {
   if (window.XMLHttpRequest) {
     xhr=new XMLHttpRequest();
   } else {
     xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   xhr.open("GET",url,false);
   xhr.send();
   return xhr.responseText;
}

?


-- 
Zlatko

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Read url into a string? SpreadTooThin <bjobrien62@gmail.com> - 2011-11-23 14:09 -0800
  Re: Read url into a string? Gene Wirchenko <genew@ocis.net> - 2011-11-23 15:00 -0800
    Re: Read url into a string? SpreadTooThin <bjobrien62@gmail.com> - 2011-11-23 15:28 -0800
    Re: Read url into a string? Zlatko Đurić <zladuric@gmail.com> - 2011-11-24 00:29 +0100
      Re: Read url into a string? SpreadTooThin <bjobrien62@gmail.com> - 2011-11-23 15:34 -0800
      Re: Read url into a string? SpreadTooThin <bjobrien62@gmail.com> - 2011-11-23 15:37 -0800
      Re: Read url into a string? SpreadTooThin <bjobrien62@gmail.com> - 2011-11-23 16:35 -0800
        Re: Read url into a string? Scott Sauyet <scott.sauyet@gmail.com> - 2011-11-23 18:02 -0800
      Re: Read url into a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-24 21:27 +0100
        Re: Read url into a string? Zlatko Đurić <zladuric@gmail.com> - 2011-11-24 22:13 +0100
          Re: Read url into a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-24 22:31 +0100
            Re: Read url into a string? Zlatko Đurić <zladuric@gmail.com> - 2011-11-24 23:08 +0100
      Re: Read url into a string? Arno Welzel <usenet@arnowelzel.de> - 2011-11-25 15:59 +0100
  Re: Read url into a string? "Evertjan." <test@abc.invalid> - 2011-11-26 13:44 -0400

csiph-web