KNIME Server: Generic Javascript View - Prevent div from scrolling

Hi community,

i have a javascript view with two div’s inside. One should be a header div and the other a content div.
I try to prevent the header div from scrolling.
If i run the javascript view in KNIME local everything is fine, the header div stays always on top even when scrolling the content div.
If i deploy it to KNIME Server it did not work anymore.

Can anyone help me here. Is this possible?

Thank you in advance

Prevent div scrolling.knwf (5.7 KB)

Also if i put the Generic Javascript View into a component, the header div is not prevented from scrolling.

Hi,
That is because when the view is embedded in a component or the WebPortal it actually lives in an iFrame that scrolls. You can give the content-class a fixed height and set overflow: scroll to have the header fixed.
Kind regards,
Alexander

1 Like

Hi @AlexanderFillbrunn,

thanks that works.

One question. Can iturn of the scrolling of the iFrame?

Hi,
I am afraid this is not possible, or at least I don’t know how to :-/
Kind regards,
Alexander

Hi @AlexanderFillbrunn

another question about the iFrame.
Why is the default iFrame so big? The height is much bigger than the content height. Can i set a fixed height to the iFrame?

BR

Hi,
yes, this should be possible using the layout editor under “Basic Layout”. Please have a look at the attached screenshot.
Kind regards,
Alexander

1 Like

Hi @AlexanderFillbrunn

this doesn’t work on the Server.
The result looks like here


A lot of space in bottom.

Hi,
Could you “photoshop” how you would like it to look?
Kind regards,
Alexander