Skip to main content

QlikView Integrations

Discussion Board for collaboration on QlikView Integration.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

9 Replies
simondachstr
Luminary Alumni
Luminary Alumni

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.

Not applicable
Author

I tried the code with my Browser and it worked. I don´t get it how to use ajax in a fiddle so i can`t use that. I think there is a problem with the setup. I am going to trie the extension on a other machine.

Thank you for the Writeback extension and the Guide, seems very nice

Thank you so far

Alexander_Thor
Employee
Employee

Hey Lars,
If you have access to a QlikView server try to test the extension on it.

I have had tons of problems doing http gets from within the desktop client but it has worked perfectly on the server.

Not applicable
Author

Yes, definitely I am going to try it on QV server.

Not applicable
Author

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

simondachstr
Luminary Alumni
Luminary Alumni

Looks like quite a workaround! But good job on making it work.

Have you contemplated using post method instead of get?

Not applicable
Author

I am already using post (know). So yes I did and I need to because of the amount of data.

kirankkk
Creator II
Creator II

Can you please share example and steps for same

mayuringale25
Partner - Creator
Partner - Creator

is there any alternative than xampp for running extension

Thanks and Regards
Mayur Ingale