Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!Iskon!not-for-mail From: =?UTF-8?B?WmxhdGtvIMSQdXJpxIc=?= Newsgroups: comp.lang.javascript Subject: Re: Read url into a string? Date: Thu, 24 Nov 2011 00:29:21 +0100 Organization: Iskon Internet d.d. Lines: 24 Message-ID: References: NNTP-Posting-Host: iskon7916.duo.carnet.hr Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunce.iskon.hr 1322090962 16363 31.147.126.236 (23 Nov 2011 23:29:22 GMT) X-Complaints-To: abuse@iskon.hr NNTP-Posting-Date: Wed, 23 Nov 2011 23:29:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:8577 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