Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QV11 Desktop: problems with extension in Web View

Hi,

we have developed our own QlikView extension to integrate our web-app into QlikView.

The extension is not complex, it's basically an adaptation of the "web page" extension in the Examples folder. It places the web-app (its external URL) in an iFrame and implements JavaScript communication between QlikView and the app.

We placed a Qlikview document containing the extension on our webserver and that works perfectly. However in the Desktop client (QV11) we are experiencing some problems. The computer we are running it on is 64 bits and contains IE8.

The problems are that,

  • Part of the layout is not displayed correctly, it seems as though some CSS or HTML is filtered out by QlikView
  • When I try to access the "parent" control of the iFrame through JavaScript, access is denied (I need to do that in order to execute some JavaScript within the extension, which in its part communicates with QlikView)

I have the feeling that the latter has to do with the fact that the QlikView document is being served on localhost, whereas the extension resides in an external domain. Still I do not understand the garbling of my layout.

What can I do to make the extension work in the Desktop client as well?

-Tom

5 Replies
Not applicable
Author

Tom -

I think I am facing a challenge that you have already figured out. Here is my challenge.

I have a Silverlight application that opens the URL in a new browser tab to display the QlikView document .. so far so good!!

However, when a user clicks on a certain button in my Qlikview document I need to do a call back to the Silverlight application in the parent browser window. I have found that I can do this using javascript (window.opener.xxCallMethodxx), this javascript call on the child page causes a javascript method to get executed on the parent page.

So, here is where I am having problems. How can I get the QlikView application to call Javascript functions based on a click event?

Any advice on how you did this is appreciated.

Not applicable
Author

Hi,

Well I didn't manage to do quite that, only part of what you want. What we wanted is to put our webapp in a child iFrame and subsequently 1) let the qlikview selections respond to a selection within our app and 2) let the app respond to selection changes in QlikView.

As I understand you, (2) is what you want but there is a limitation to the solution that we chose. Basically what we did, and what you could do, is to create a qlikview extension and place it in your document as an object. Then you can assign data to that object just as you would for a normal table/graph object, with dimensions and expressions. Then when something changes in the selection of one of these fields, the object gets notified with a callback and there you can execute your Javascript. You do have to use a trick to be able to spot what changed exactly; in the object initialization you'll have to copy all the possible selections in QV.Data to your own Javascript array. Then in later calls you can compare the current content of QV.Data against the "full" array. Also, you have to put the Page size high enough to contain all selections.

Much of our source code was inspired on an extension object of a Swedish map that someone made to demonstrate integration of Qlikview with a JavaScript vector library. I can look up the name, or send you portions of our source code later. Just be aware that it will only respond to changes in selections to the data fields that you assign to the object.

I'm not sure if there might not be a better way to do it for your case; you could for example also try to enter the Macro world and try it through some hooks on selection changes calling a JScript macro.

Does that help you?

Not applicable
Author

Tom –

Yes that does help me, it helps me to see that there is no easy way to do this in Qlikview J

If I wanted the following:

1. User select Client from listbox

2. User presses button to go back to parent application

3. Button calls javascript passing in the ClientID of the item that was selected (or extension can query back to source object?)

4. Javascript on Quikview page callbacks to Silverlight Javascript

So #3 above would call a Qlikview extension? And the Qlikview extension is the method that is used to execute JS. Can the extension object look back at the Quikview object to see what field has been selected?

Given that I have only been working in Qlikview for 2 weeks now (trying to do a Proof Of Concept for Management) ALL advice and guidance is appreciated. Also, any sample code that you can share with me or direct me too is also appreciated

Not applicable
Author

Hi, as I understand it, the content of the listbox that you want to create bears no relation to the data within the QlikView, but is just a predefined list of clients? In that case it becomes simpler. I would still implement that with an extension (since I don't know any better at the moment). That extension will create a listbox, that will execute some JavaScript upon select.

In the attachment you will find a sample extension that will do this, with some tweaking it should do what you want.

Simply doubleclick the QAR file (it's actually just a renamed ZIP file) and it will decompress into the %AppData%\QlikTech\Extensions folder for your QlikView Desktop client, where you can edit it as you please and then copy it to the Extension folder of your QlikView Server which should be somewhere within C:\Program Data\.

http://www.antiflu.dds.nl/ClientSelect.qar

Not applicable
Author

Hi Tom,

You had mentioned in your previous comment:

     "Well I didn't manage to do quite that, only part of what you want. What we wanted is to put our webapp in a child iFrame and subsequently 1) let the qlikview selections respond to a selection within our app and 2) let the app respond to selection changes in QlikView."

Can you give a detailed explanation of how you achieved this? We actually are looking for a similar functionality to achieve two way communication between a qlikview extension object ( Web Page in an iframe ) and Qlikview document.

We have gone through the SelectClient extension object that you provided earlier but couldn't get much help from that. It would be great if you could provide us another example.

Thanks in advance,

Santosh