Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to change a button image on mouse over/ mouse hover, similar to what can be done with javascript?

I simply want to change the background button image, if a use hovers over it.  This is something I've done with Javacript in the past.  Is this possible in QlikView?  I'm very new to QlikView.

I've googled, you tubed and looked on the community for this but can't find anything useful.

Thanks in advance!

Greg

19 Replies
Not applicable
Author

I know I have a lot to learn, but I have even more to learn than I expected!

Are you able to explain to me how I can see the code you used to create that example, now that I have it downloaded?

It was nearly perfect!  One potential issue of, if the document is clicked, the hover color will eventually freeze, but this is exactly what I was looking for, if I can see how it was done. Thanks for expediting the process!

Clever_Anjos
Employee
Employee

You have to be familiar with Javascript and jquery library

// You can load a CSS if you want

Qva.LoadCSS("/QvAjaxZfc/QvsViewClient.aspx?public=only&type=document&name=Extensions/Hover/Hover.css");

Qva.AddDocumentExtension('Hover', function () { // Attach the extension to your document

  var oldcss = "";

  this.Document.SetOnUpdateComplete(function () {  // Attach a handler to QV, 'when you finish, please call me'

  $('table.TextObject').hover(   // Please google for jquery hover function

  function (){

  oldcss = $(this).css("background-color"); // saves last background color

  $(this).css("background-color","blue");   // sets new background color

  },

  function (){

  $(this).css("background-color", oldcss);  // restores background color

  });

  });

});

//

Not applicable
Author

Thanks!  I don't think I worded that last question very well.  I am actually trying to figure out where the QAR file stored the .js file and how to tie it into the qvw file.

I'm slowly picking that up.  The qar file is an extension that is applied by doing to Document properties and moving the Hover Extension over to the Active Extensions side.

I used the LoadFirebug extension to look at the HTML to see that the source script was QvAjax.js

I can walk through the jsavascript some, but it has been a few years, as I've mainly worked with SQL for the last several years.  I have a lot of studying to do.  Thanks again for your assistance!

Clever_Anjos
Employee
Employee

Document Extensions resides in C:\Users\[youruser]\AppData\Local\QlikTech\QlikView\Extensions\Document


Document Extensions are applied to a document (qvw) using Document Properties / Extensions Tabs


There´s another type of extension (Object Extensions, under C:\Users\[youruser\AppData\Local\QlikTech\QlikView\Extensions\Objects) that implements visualizations that QV can´t do "out of the box"


Please check your folder C:\Program Files\QlikView\Examples\Extensions there´s some samples of Object Extensions too


You can add my skype: cleveranjos, we can chat to help you better

Not applicable
Author

Thank you.  If I ever get a skype account, I will definitely add you.  This has been tremendously helpful and a lot of things fall into place.  I still have so much to learn to be able to appropriately apply this, but this is all a great start!

Clever_Anjos
Employee
Employee

You could invest some time reading this link http://www.qlikfix.com/2012/07/03/qlikview-extension-tutorials-documentation-and-examples/

and its tutoriais.

It would be very enlightening

szeconku
Contributor II
Contributor II

When unzipping "Hover.qar", I noticed you don't include "Hover.css". Will the extension still work?

Clever_Anjos
Employee
Employee

I´m using Jquery to overwrite the CSS

$(this).css("background-color","blue");

Anonymous
Not applicable
Author

Hi,

can u give the same code for Qliksense to do the on click  function on a element button to change the background color of it.

gireesh1216
Creator II
Creator II

Not able to change mouse over color.Can u please help me hoe change mouse over color from blue to light grey?
If possible can u please share extension script???