Internet Explorer Stops Responding On SAP Portal

This is a very frustrating problem I encountered in one of our clients today. Some of the users (with laptops) can browse SAP Portal with Internet Explorer 8 without any problems – in compability mode of course. On the other hand; a few users helplessly watched Internet Explorer become unresponsive after clicking some links in the portal. The page starts to load, images and texts appear; however, just when the page is supposed to be finished loading, it freezes and Internet Explorer becomes unresponsive.

 
 

I searched the Internet and OSS to find a solution, but couldn’t find anything useful. However; I discovered the reason behind this problem and wanted to publish it.

 
 

The common thing among the problematic users was; they zoomed in or out in Internet Explorer. This means; they didn’t view the page in the default zoom level of 100%. Instead, their zoom level in Internet Explorer was changed to view the page in a size of 150% or 75%. Turning the zoom level back to 100% worked like a charm and the problem was gone.

 
 

This is probably an Internet Explorer related problem. The zoom level on the client side doesn’t have any effect on the server content. My guess is; Internet Explorer tries to fit the elements onto the browsing area after the content has been loaded from the server, but fails to do a sizing calculation or something – stuck in an infinite loop. Just out of curiousity, I turned on the developer window in Internet Explorer and re-entered the page after changing the zoom level back to 150%; and I saw that one of the Javascripts was being reloaded 4-5 times every second. This kindof supports my theory as Internet Explorer probably tries to reload the content after each resize operation – of some invisible IFrames perhaps?

 
 

I believe the ultimate solution should be published by Microsoft. However, SAP can also publish some kind of a workaround for that problem.

 
 

Whatever the case may be, just switch back to the default zoom level of 100% and try to adjust your eyes until SAP or Microsoft releases a fix for that.

 
 

For those script addicts; here is the source of the page that locks up Internet Explorer on non-default zoom levels:

 
 

 
 

<!DOCTYPE
HTML
PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

<html
dir=”ltr”>

<head>

<meta
http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

<meta
http-equiv=”Cache-control” content=”no-cache”>

<meta
http-equiv=”Pragma” content=”no-cache”>

<meta
http-equiv=”Expires” content=”-1″>

<title>ZLAW_CUST_01 [ABAP için web ekranı]</title>

<script
type=”text/javascript” language=”JavaScript” src=”/sap/public/bc/webdynpro/ssr/SAPWebFramework.js?00080002017001001001001001001″></script>

<script
type=”text/javascript” language=”JavaScript”>

var frame_A = “DEAD0D3DF78CEBF19B0C002264FADEB2_A”;

var frame_B = “DEAD0D3DF78CEBF19B0C002264FADEB2_B”;

var lastShowFrame;

var lastHiddenFrame;

var responseCounter;

var is_suspend = false;

var sapICFRecorder_active = false;

var timeout_string;

var countDownStartApplication = 3;

var applicationLoaded = false;

SAP_bindPageToDomain();

function Loader() {

}

function exitApplication() {

//only send unload template in case of it is not a suspend

if (!is_suspend)

{

var url =“zlaw_cust_01/?sap-sessioncmd=USR_LOGOFF&sap-contextid=SID%3aANON%3aAPSOSIRIS_PSP_04%3aXhfdXWbStFXjQOH5kDrAPtO2qfAzAE8j3S7QR_N8-NEW”;

if (window.XMLHttpRequest) {

req = new XMLHttpRequest();

req.open(“GET”, url, false);

req.send(null);

}

else {

var xml = document.createElement(“xml”);

document.body.appendChild(xml);

if (xml.XMLDocument) {

xml.XMLDocument.async = false;

xml.XMLDocument.load(url);

}

else{

img=new Image;

img.src= url;

for(i=0;i<70;i++){ tmp=document.body.outerHTML; while(tmp)tmp=tmp.slice(1) }

document.getElementById(“DEAD0D3DF78CEBF19B0C002264FADEB2_FRAMESET”).onunload = null;

}

}

}

}

function getHiddenFrame() {

if (document.body.rows==‘*,0’) return frame_B; else
return frame_A;

}

function getShownFrame() {

if (document.body.rows==‘*,0’) return frame_A; else
return frame_B;

}

function swapToFrame(frame) {

if (frame == frame_A) document.body.rows=‘*,0’; else document.body.rows=‘0,*’;

}

function replaceHTML(html)

{

document.open();

document.write(html);

document.close();

}

function redirect( newURL )

{

is_suspend = false;

location.href = newURL;

}

function suspend( newURL )

{

is_suspend = true; location.href = newURL;

}

var A_active = false;

var B_active = false;

function SwitchFrame2()

{

var newShowFrame = getHiddenFrame();

var newHiddenFrame = getShownFrame();

try {

if ( document.all )

{

window.frames[newShowFrame].document.releaseCapture();

window.frames[newHiddenFrame].document.releaseCapture();

}

doc=window.frames[newShowFrame].document;

adjustFormTarget(doc,newHiddenFrame);

} catch(e) {}

try { doc2=window.frames[newHiddenFrame].document; } catch(e) {}

swapToFrame(newShowFrame);

lastShowFrame = newShowFrame;

lastHiddenFrame = newHiddenFrame;

};

function adjustFormTarget(doc,newHiddenFrame)

{

for (var i = 0; i < doc.forms.length; i++)

{

var frm = doc.forms[i];

if (frm.target==“” || frm.target==“_self” || frm.target==“_parent”)

frm.target = newHiddenFrame;

}

if(document.all) {

var tagsIFrame = document.all.tags(“IFRAME”);

for(var i=0;i<tagsIFrame.length;i++)

{

try

{

doc = tagsIFrame[i].contentWindow.document;

adjustFormTarget(doc,newHiddenFrame);

} catch(e) {}

}

}

};

var ACF_pendingNotifyLoad = new Array();

var ACF_pendingNotifyHooked = new Array();

var aActiveControls = new Array();

var delta_frame = false;

var oldScrollPosLeft;

var oldScrollPosTop;

var doubledDeltaSPANs;

var doubledDeltaSPANsRemovalCounter;

var profiling_start = new Date();

function onDeltaFrameLoaded(newResponseCounter,sourceDocument,channelsEnabled)

{

//start the profiling

profiling_start = new Date();

//determine some variables

var shownFrame = getShownFrame();

var hiddenFrame = getHiddenFrame();

//check for back navigation

//submit the form again in case it was reloaded from the browser cache

//var pageRequestNumber = parseInt(shownDocument.forms[“sap.client.SsrClient.form”].elements[“sapwdssr..requestCounter”].value);

window[shownFrame].sapWD_currentResponseCounter = newResponseCounter;

if ( responseCounter >= newResponseCounter )

{

window[shownFrame].sapWD_Request.submit();

return false;

} else

{

for ( var cur_popup in popups )

{

popups[cur_popup].sapWD_currentResponseCounter = newResponseCounter;

if ( responseCounter >= newResponseCounter )

{

popups[cur_popup].sapWD_Request.submit();

return false;

}

}

}

responseCounter = newResponseCounter;

//create a new array for the doubled delta spans that are supposed to be removed alot later

doubledDeltaSPANs = new Array();

doubledDeltaSPANsRemovalCounter = 0;

var hiddenDocument = sourceDocument;

var onloadScriptArray = new Array();

var shownDocumentArray = new Array();

//perform the DOM injection for each window

var bodyBlock = hiddenDocument.getElementById(‘body’);

var onloadScriptBlock = hiddenDocument.getElementById(‘onloadScript’);

for ( var cur_window = 0; cur_window < bodyBlock.childNodes.length; cur_window++ )

{

if ( bodyBlock.childNodes[cur_window].nodeType == document.body.TEXT_NODE )

continue;

var shownDocument = window.frames[shownFrame].document;

if ( bodyBlock.childNodes[cur_window].id != ‘sapwdssr..main_span’)

{

shownDocument = popups[bodyBlock.childNodes[cur_window].id].document;

}

var onloadScript;

for ( var cur_onloadScript = 0; cur_onloadScript < onloadScriptBlock.childNodes.length; cur_onloadScript++ )

{

if ( onloadScriptBlock.childNodes[cur_onloadScript].nodeType == document.body.TEXT_NODE )

continue;

if ( onloadScriptBlock.childNodes[cur_onloadScript].id == bodyBlock.childNodes[cur_window].id )

onloadScript = onloadScriptBlock.childNodes[cur_onloadScript].childNodes[0].nodeValue;

}

for ( var curSubBlock = 0; curSubBlock < bodyBlock.childNodes[cur_window].childNodes.length; curSubBlock++ )

{

if ( bodyBlock.childNodes[cur_window].childNodes[curSubBlock].nodeType == document.body.TEXT_NODE )

continue;

var blockContent = bodyBlock.childNodes[cur_window].childNodes[curSubBlock];

switch( blockContent.id )

{

case
‘delete’:

var deleteBlock = blockContent;

break;

case
‘update’:

var updateBlock = blockContent;

break;

case
‘insert’:

var insertBlock = blockContent;

break;

}

}

//execute all delete operations

for ( var i = 0; i < deleteBlock.childNodes.length; i++ )

{

var toBeRemoved = shownDocument.getElementById(deleteBlock.childNodes[i].id);

toBeRemoved.parentNode.removeChild( toBeRemoved );

}

//execute all update operations

for ( var i = 0; i < updateBlock.childNodes.length; i++ )

{

if ( updateBlock.childNodes[i].nodeType == document.body.TEXT_NODE )

continue;

//get the new HTML

var newHTML = updateBlock.childNodes[i].childNodes[0].nodeValue;

//disable scripts to be executed

//newHTML.replace(/<script>/,”<script defer>”); ” UKL

//no acf object tags inside – just do normal replacement

shownDocument.getElementById(updateBlock.childNodes[i].id).innerHTML = newHTML;

/*

//get all script tags inside of the html and execute them

var scripts = newHTML.match(/<script.+script>/g);

if ( scripts )

for (var j = 0; j < scripts.length; j++ )

onloadScript += ( “;” + scripts[j].replace(/<\/script.*>$/,””).replace(/<script.*>/,””) );

*/

}

//save the onloadScript inside of an array for later execution

onloadScriptArray[bodyBlock.childNodes[cur_window].id] = onloadScript;

shownDocumentArray[bodyBlock.childNodes[cur_window].id] = shownDocument;

}

//find onload script that has been transferred without any corresponding html blocks

for ( var cur_onloadScript = 0; cur_onloadScript < onloadScriptBlock.childNodes.length; cur_onloadScript++ )

{

if( onloadScriptBlock.childNodes[cur_onloadScript].nodeName == ‘#text’ ) continue; var correspondingHTMLBlockExists = false;

for ( var cur_window = 0; cur_window < bodyBlock.childNodes.length; cur_window++ )

{

if ( onloadScriptBlock.childNodes[cur_onloadScript].id == bodyBlock.childNodes[cur_window].id )

correspondingHTMLBlockExists = true;

}

if ( !correspondingHTMLBlockExists )

{

onloadScriptArray[onloadScriptBlock.childNodes[cur_onloadScript].id] = onloadScriptBlock.childNodes[cur_onloadScript].childNodes[0].nodeValue;

shownDocumentArray[onloadScriptBlock.childNodes[cur_onloadScript].id] = window.frames[shownFrame].document;

if ( onloadScriptBlock.childNodes[cur_onloadScript].id != ‘sapwdssr..main_span’ )

shownDocumentArray[onloadScriptBlock.childNodes[cur_onloadScript].id] = popups[onloadScriptBlock.childNodes[cur_onloadScript].id].document;

}

}

//call the onload script for all windows

window[shownFrame].sapWD_onNewRequest( onloadScriptArray[‘sapwdssr..main_span’] );

for ( var cur_popup in popups )

if ( typeof(onloadScriptArray[cur_popup]) == ‘undefined’ )

popups[cur_popup].sapWD_onNewRequest( );

else

popups[cur_popup].sapWD_onNewRequest( onloadScriptArray[cur_popup] );

//finish the performance measurements

window[shownFrame].sapWD_updateConsole();

}

function activateBackPrevention( ){

try{

var shownFrame = window.getShownFrame();

window.frames[shownFrame].activateBackPrevention()

} catch(ex) {}

}

function sapWD_Active_Comp_getPagePointer()

{

var shownFrame = getShownFrame();

return
“window.frames[\”” + shownFrame + “\”]”;

}

function onFrameLoaded(currentFrame) {

if ( !delta_frame )

{

try {

var is_domain_relax = frames[currentFrame].location.pathname.match(domain_relax.html);

} catch(e) {}

if ( !is_domain_relax )

{

if ( lastShowFrame != currentFrame )

SwitchFrame2();

try {

var object_tag = doc2.getElementsByTagName(“object”)[0];

var delete_me = true;

if ( object_tag )

{

if ( delete_me )

object_tag.parentElement.removeChild(object_tag);

}

} catch(e) {}

}

countDownStartApplication = countDownStartApplication – 1;

if (countDownStartApplication == 0)

onApplicationLoaded();

}

delta_frame = false;

//focus the current frame again

//window[getShownFrame()].document.body.setActive();

// call the backprevention as last action

activateBackPrevention();

};

function onApplicationLoaded(){

applicationLoaded = true; }

function onFrameFocus(currentFrame)

{

var shownFrame = getShownFrame();

try { if( window.frames[shownFrame].ur_system.is508 == true ){

window.frames[getShownFrame()].tabIndex=‘0’;

window.frames[getHiddenFrame()].tabIndex=‘-1’;

return; }} catch (e) {};

if ( shownFrame != currentFrame )

window.frames[shownFrame].focus();

};

var popups = new Array();

function onPopupLoaded(id,popup)

{

popups[id]=popup;

try {

popup.document.releaseCapture();

} catch(e) {}

adjustFormTarget(popup.document,getHiddenFrame());

}

function onPopupDestroyed(id)

{

delete popups[id];

}

ACFdestroyHandler = {};

ACFdestroyHandler.destroy = function(id)

{

delete aActiveControls[id.substr(0,id.indexOf(“-ph”))];

};

function onChannelEvent()

{

//popup support needs to be added

window.frames[getShownFrame()].sapWD_Request.submit();

}

function onFullRequest()

{

//clear the popup array, since all popups will be rebuild

popups = new Array();

}

</script>

</head>

<noscript><iframe
tabindex=”-1″ style=”position:absolute;top:0;left:0;width:100%;height:100%” src=”?sap-wd-exception=NO_JS”></noscript>
<frameset
tabindex=”-1″ id=”DEAD0D3DF78CEBF19B0C002264FADEB2_FRAMESET” rows=”*,0″ resize=”no” frameborder=”0″ framespacing=”0″ onUnLoad=”exitApplication();”>

<frame
name=”DEAD0D3DF78CEBF19B0C002264FADEB2_A” src=”zlaw_cust_01/~ucfLOADING?sap-contextid=SID%3aANON%3aAPSOSIRIS_PSP_04%3aXhfdXWbStFXjQOH5kDrAPtO2qfAzAE8j3S7QR_N8-NEW” noresize
onload=”onFrameLoaded(frame_A);” onFocus=”onFrameFocus(frame_A);”>

<frame
tabindex=”-1″ name=”DEAD0D3DF78CEBF19B0C002264FADEB2_B” src=”/sap/public/bc/webdynpro/ssr/domain_relax.html?00080002017001001001001001001″ noresize
onload=”onFrameLoaded(frame_B);” onFocus=”onFrameFocus(frame_B);”>

<noframes></noframes>

</frameset>

</html>

 
 

 
 

 
 

Advertisement

Posted

in

,

by

Tags:

Comments

4 responses to “Internet Explorer Stops Responding On SAP Portal”

  1. Andi Avatar
    Andi

    Many thanks for this post. Helps me to fix my problem.
    Best regards, Andi

    1. Dr. Kerem Koseoglu Avatar

      You are welcome, I’m glad that the post made your life easier =)

  2. Sabine Avatar
    Sabine

    Good article Kerem, it just helped me to close the problem ticket I had assigned to me.

    Thank you!!

    1. Dr. Kerem Koseoglu Avatar

      Im glad the post helped you =)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s