• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Debian XMLHttpRequest Opera

    Opera for Linux
    2
    7
    765
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • anpden
      anpden last edited by

      Good afternoon.
      There is a code:

      <script>
          var X = 0;
          var Y = 0;
       
          function allowDrop(ev) {
            ev.preventDefault();
          }
       
          function drag(ev) {
          //  debugger;
              ev.dataTransfer.setData("text", ev.target.id);
          }
       
          function drop(ev) {
            ev.preventDefault();
            var data = ev.dataTransfer.getData("text");
           // ev.target.appendChild(document.getElementById(data));
       
          //console.log(ev)
       
           //id = document.getElementById(data);
           document.getElementById(data).style.position = "absolute";
           document.getElementById(data).style.left = (ev.x - X) + "px";
           document.getElementById(data).style.top = (ev.y - Y) + "px";
       
           // 1. Создаём новый объект XMLHttpRequest
          var xhr = new XMLHttpRequest();
       
          // 2. Конфигурируем его: GET-запрос на URL 'phones.json'
          xhr.open('GET', '/save?id=' + data + '&x=' + (ev.x - X) + '&y=' + (ev.y - Y) , true);
       
          // 3. Отсылаем запрос
          xhr.send();
       
       
          }
       
          function lol(ev, th){
            // debugger
             X =  ev.clientX - th.offsetLeft; //ev.layerX;
             Y =  ev.clientY - th.offsetTop; //ev.layerY;
             console.log([X,Y])
          }
       
      </script>
      

      Sending GET request does not work for Opera 42 x64 Debian

      But under Opera 36 for Win XP - works.

      Tell me, can have any configuration including XMLHttpRequest?

      Reply Quote 0
        1 Reply Last reply
      • A Former User
        A Former User last edited by

        I have nothing to suggest for your issue, but why are you using such an old version of opera?

        Reply Quote 0
          anpden 1 Reply Last reply
        • anpden
          anpden @Guest last edited by

          @jimunderscorep
          What is installed, this is used.
          The company cannot or does not want to update or install newer.

          But then strange, why in Opera 36 for Win XP all works, and in Opera 42 - already not works. Or there version number depends on each OS?

          Reply Quote 0
            1 Reply Last reply
          • A Former User
            A Former User last edited by

            Opera 36 is the last version that supports xp, so it probably works as it should with its prehistoric libraries.
            Opera 42 however is not the latest version for 64bit linux. For 32bit linux, the last version of opera is 45, which is 2 years old now.
            In fact, opera 42 is ~2.5 years old. What version of debian are you on and what other browsers do you use?

            Reply Quote 0
              anpden 1 Reply Last reply
            • anpden
              anpden @Guest last edited by anpden

              @jimunderscorep
              Use the browsers Firefox 27 x64 and 42 x64 of the Opera.
              In Firefox, the Get request works, but the calculation of X and Y coordinates does not work.
              OS using Debian 7.0 Wheezy x64

              Reply Quote 0
                1 Reply Last reply
              • A Former User
                A Former User last edited by

                @anpden said in Debian XMLHttpRequest Opera:

                OS using Debian 7.0 Wheezy x64

                Now I understand why you have all those old versions on all browsers. They use the system's old libraries to work with a modern webpage and fail.
                Try creating a virtual machine with debian 9 or 10, install all the recent versions of your browsers and check your page again. I am pretty sure it will work properly there.

                For the record, debian 7 reached its eol (end of life) in 2016 and its lts eol in 2018. More info here
                https://wiki.debian.org/DebianReleases#Production_Releases

                Reply Quote 0
                  anpden 1 Reply Last reply
                • anpden
                  anpden @Guest last edited by anpden

                  @jimunderscorep
                  At home, on the local server, everything works - checked more than once.
                  the entire Park has deployed a modern OS - it works fine.

                  but such old systems, even the installation files are not found 🙂

                  Okay, so the topic can just be closed, so as to reinstall OS, no one will.

                  or maybe someone knows how can I replace this code 🙂

                  Reply Quote 0
                    1 Reply Last reply
                  • First post
                    Last post

                  Computer browsers

                  • Opera for Windows
                  • Opera for Mac
                  • Opera for Linux
                  • Opera beta version
                  • Opera USB

                  Mobile browsers

                  • Opera for Android
                  • Opera Mini
                  • Opera Touch
                  • Opera for basic phones

                  • Add-ons
                  • Opera account
                  • Wallpapers
                  • Opera Ads

                  • Help & support
                  • Opera blogs
                  • Opera forums
                  • Dev.Opera

                  • Security
                  • Privacy
                  • Cookies Policy
                  • EULA
                  • Terms of Service

                  • About Opera
                  • Press info
                  • Jobs
                  • Investors
                  • Become a partner
                  • Contact us

                  Follow Opera

                  • Opera - Facebook
                  • Opera - Twitter
                  • Opera - YouTube
                  • Opera - LinkedIn
                  • Opera - Instagram

                  © Opera Software 1995-