Skip to content Skip to sidebar Skip to footer

scroll issue

Solve Scroll Issue:-
    Scroll Issue is the most common issue in all browser, this problem mostly occur when you create a dynamic content like table, text boxes and etc. The following code will help to find the dynamic expanded div height and additionally increase the side 100px. So if your div height is increased dynamically the following code will help to expand the scroll bar and fix your scroll issue problem.


Code for fix the Scroll Issue:-

         function setIframeHeight() {
             frame = parent.document.getElementById('frame1');
             var sSupersetString = navigator.userAgent;
             if (sSupersetString.indexOf("Firefox") != -1) {
                 $(frame).height(Number($(frame).contents().find("html").height()) + 600);
             }
             else {
                 if (frame) {
                     var iframeWin = frame.contentWindow || frame.contentDocument.parentWindow;
                     if (iframeWin.document.body) {
                         frame.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
                         frame.height = frame.height;
                         var ss = Number(frame.height) + 600;

                         innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
                         objToResize = (frame.style) ? frame.style : frame;
                         objToResize.height = (ss) + "px";
                     }
                 }
             }
         }



Advertisement




Screen shot:-

Post a Comment for "scroll issue"