Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to resize Workbench QVObjects from javascript as the browser window changes sizes?
Sorry I didn't see this earlier but this is definitely possible. Do you still need help?
If so, could you be more specific about what you're trying to do?
Yes, could still use some help.
<qww:QvObject ID="QvObject3" runat="server"
QlikViewDocument="NetworkPerformance (Local)"
QvAjaxZfcPath="http://jimsserver02/QvAjaxZfc/" BorderStyle="Solid"
ObjectID="CH04" ObjectType="Straight Table" Width="1000px"
Height="325px" />
Want to be able to adjust the width & height of the QvObject client side from Javascript.
Thanks, Jim
It should be pretty easy to do if you get the ID of the created object (not the QvObjectID, the id of the div that is written out to the page which contains the object...it has a class of QvFrame), using javascript like:
var thisDiv = document.getElementById("The name of the ID");
Then change the height and width like this:
thisDiv.style.height="400px";
So if you wanted to get the width of the browser window (and you're not using jQuery or something), see this article for the best way to suit your needs:
http://www.javascripter.net/faq/browserw.htm
Once you have the height or width as a variable (for example browserHeight), just do:
thisDiv.style.height= browserHeight + "px";
I can get the <DIV> then encloses the QvObject to resize but the chart/table is not redrawn to fit in the newly sized QvObject. There is a gray boarder with the new size but the chart/table image does not change. My current work around is to do a postback and set the width/height from C# codebehind. Would really like to figure out how to get the QvObject to redraw. Thanks.