Ads displayed for guests and not donating members only. Get ad-free by donating. If you have already donated, please read here.
Results 1 to 3 of 3

Thread: get expected_tank_values_latest.json from

  1. #1

    get expected_tank_values_latest.json from

    At my userscript I try:
    	var xmlhttp = new XMLHttpRequest();"GET", '', true);
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4) {
                if (xmlhttp.status == 200) {
    				alert('test'); // test
    				// etc
    and have no result. When readyState == 4, I see status == '' and responseText==''.
    I try POST request and different setRequestHeader(), but failed again :-(
    When I upload file to dropbox, I have status == 200 and valid responseText

    How I can write correct request to

  2. #2
    Commander's Avatar
    Join Date
    Jan 2013
    Erlangen, Germany
    JavaScript has a limitation regarding loading of data from another domain if a specific header flag is not set ("Access-Control-Allow-Origin").
    Feel free to download the file with any other non-JS method.
    Last edited by; 2015-10-15 at 13:13.

  3. #3
    Quote Originally Posted by View Post
    Feel free to download the file with any other non-JS method.
    I can't use "any other non-JS method" when I write userscript for browser :-)

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts