8 Replies Latest reply: Jul 31, 2015 6:25 AM by Kiran Kokade RSS

    ajax to php

      Hi Guys!

       

      I try to use a ajax request in QlikView Extension to get a php file.

      I get this error message in QlikView when I run the script:

       

       

      I don't know what the problem is.

      I hope someon can help me with this??

       

       

      I am using:

      localhost (Apache)

      QlikView Personal Edition

       

       

      here is my QlikView script.js:

       

       

       

      And here is my PHP script on localhost:

       

       

      And here the result when I use the url with my Browser: (so my Apache is working)

       

       

      I've tried many different possibilities and I also tried an XMLHttpRequest which doesn`t work.

      So I hope somebody out there can help my with this.

       

      Many thanks!

       

      Lars

        • Re: ajax to php
          Martin Mahler

          Hi Lars,

           

          Not sure exactly why your code is not working as it seems pretty straightforward to me. Try debuggin with fiddler if you have not already done so. I've implemented once something similar, however using a WCF service to host the web service. I've summarized my code into a small demo here: SQL Writeback from QlikView extension object.

           

          Hopefully this may help or point you into the right direction.

          • Re: ajax to php

            So good news i have a working extension.

            So here my latest insight on this topic:

             

            1. the code is fine

            2. sending data to php (localhost) file is possible (I am now using the XMLHttpRequest method)

            3. getting data directly back from php (localhost) seems not possible. ( Is it a security issue?, maybe because it's not the same domain?) So this the problem.

            4. getting data with XMLHttpRequest from QV-extension folder is possible

            -->so I build a workaround for getting data from php/localhost:

            php creates a texttfile in QV-extension folder then getting data with XMLHttpRequest

             

            To get a graps what I am talking about here is a picture of my scenario:

             

             

             

            So the main-goal is to connect to MySQL via QV-extension.

            Maybe someone have some ideas or insight on this topic.

            I know there are extension writing to SQL Server. But there not working yet on my system.

            I need to debug them with Visual Studio and I know I can connect with VS to MySQL to, so maybe I will try this  sometime.

             

            I am happy about any suggestion

             

            kind regard


            Lars