Search code examples
htmlcssjstreeframesethtml4

How make frameset resize appropriately with jstree context menu


I'm looking for a solution of how to re-size frames within framesets appropriately (Unfortunately, I'm not given time to convert the legacy app to not use frames). I have a jstree tree view in IE 11 in which the context menu gets cut off because the frame is not re-sized all the way. Please note the following 2 images:

Context menu cut off

enter image description here

Context menu NOT cut off because frame was manually resized.

enter image description here

I'm hoping for one of the following possible solutions:

  1. What can I add to the frame / css so that the frame automatically resizes when the context menu appears?
  2. What can I add to the frame / css so that the context menu will overlap the adjacent frame?

Please help.


Solution

  • So I was able to find a solution that would allow me to dynamically re size the frame when the context menu appears and disappears (Option 2 does not appear to be possible). The following code in my JavaScript allows for the frame to be resided accordingly.

    // when context menu is shown
    $(document).bind('context_show.vakata', function (reference, element, position) {
        $('#adjacentFrame', parent.document).attr('cols', '40%,60%');
    });
    
    // when context menu is hidden
    $(document).bind('context_hide.vakata', function (reference, element, position) {
        $('#adjacentFrame', parent.document).attr('cols', '30%,70%');
    });