Cool Solutions

GroupWise 7 WebAccess, IE8, and the Missing Next Button



By:

May 12, 2010 4:59 pm

Reads:3,689

Comments:0

Score:Unrated

At our institution, we’re running a GroupWise 7 system. Recently, we had heard rumblings from our users about how the “Display Next” button had disappeared in WebAccess. Not surprisingly, Internet Explorer 8 renders the web application message list in a slightly different fashion than most other browsers. The “Next” button wasn’t missing, it was just buried below a large amount of whitespace in the client window, forcing the users to scroll down a screen to get to it. This problem did not occur in IE8 “compatibility mode”.

It appeared to me as if the DOM rendering in IE8 was going a bit haywire, almost as if the div that contained the “Display Next” button was not being rendered outside of the message list table, but was being drawn within the table, causing a large wrap to occur. I never did get a good explanation as to what exactly was happening, but I was able to hack out a solution.

After digging through several template and css files, I came across some of the JavaScript code that is designed to fix client height issues in older and less standard browsers. That code resides (on Linux WebAccess) in /var/opt/novell/gw/com/novell/webaccess/images/msglist.js. The values being returned by the height variables in that code all seemed to be correct when debugging in IE8. The document.documentElement.clientHeight values looked good as did the offsets, so that further supported my thoughts that the problem lies with the IE8 CSS\DOM rendering.

Since this code was already designed to address client height issues, I decided to just add to it with some code to browser sniff for IE8 and use the JS style properties to modify the stylesheet. That kept me from having to modify templates or do any restarting of Tomcat or other services.

So, the solution that I came up with was to, first, do browser sniffing for IE8 not in compatibility mode. I got the following code straight from Microsoft at http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx .

engine = null;

if (window.navigator.appName == "Microsoft Internet Explorer")
{
   // This is an IE browser. What mode is the engine in?
   if (document.documentMode) // IE8
	  engine = document.documentMode;
   else // IE 5-7
   {
	  engine = 5; // Assume quirks mode unless proven otherwise
	  if (document.compatMode)
	  {
		 if (document.compatMode == "CSS1Compat")
			engine = 7; // standards mode
	  }
   }
   // the engine variable now contains the document compatibility mode.
}

Next, I needed to modify the CSS at the client level to try and force the page elements in the right place. After a lot of trial and error, here is what works for our WebAccess templates…

if( engine == 8)  // 8 indicates IE8, not in compatibility mode
{
	var dHeight = getDocHeight();
	tblContainer.style.height = dHeight  - tblContainer.offsetTop - divMsglist.offsetTop - 24;  
	divMsglist.style.overflow = "hidden";
	btnDisplayNext.style.width = "100%";
	btnDisplayNext.style.height = "24px";
	btnDisplayNext.style.position = "absolute";
	btnDisplayNext.style.backgroundColor = "white";
	btnDisplayNext.style.marginTop = -document.documentElement.scrollHeight + tblContainer.offsetTop + 60;  // not sure why, but 60 is the magic number here
}  

Putting it all together, the code in msglist.js looks like this…

function fixContentHeight(e)
{
	var divFolders = document.getElementById( 'gw-folders' );
	var divMsglist = document.getElementById( 'gw-msglist' );
	var tblContainer = document.getElementById( 'tableContainer' );
	var btnDisplayNext = document.getElementById( 'idDisplayNext' );

	engine = null;

	if (window.navigator.appName == "Microsoft Internet Explorer")
	{
	   // This is an IE browser. What mode is the engine in?
	   if (document.documentMode) // IE8
		  engine = document.documentMode;
	   else // IE 5-7
	   {
		  engine = 5; // Assume quirks mode unless proven otherwise
		  if (document.compatMode)
		  {
			 if (document.compatMode == "CSS1Compat")
				engine = 7; // standards mode
		  }
	   }
	   // the engine variable now contains the document compatibility mode.
	}

	//Set the folders pane height
	if ( divFolders != null)
	{
		divFolders.style.height = ( document.documentElement.clientHeight - divFolders.offsetTop ) - 7 + "px";
	}

	//Set the msglist pane height
	if ( divMsglist != null)
	{
		divMsglist.style.height = ( document.documentElement.clientHeight - divMsglist.offsetTop ) - 1 + "px";
	}

	//if we have messages to show then we need to set the table height
	if ( tblContainer != null)
	{
		var height = ( divMsglist.offsetHeight - tblContainer.offsetTop );

		var flvMjrVer = parseInt( inc_browserFlvMjrVer );
		if( btnDisplayNext != null )
		{
			if( inc_browserFlavor == "SAFARI" && flvMjrVer < 312)
			{
				//Don't set any height for this old version of SAFARI
			}
			else if( engine == 8)
			{
				var dHeight = getDocHeight();
				tblContainer.style.height = dHeight  - tblContainer.offsetTop - divMsglist.offsetTop - 24;
				divMsglist.style.overflow = "hidden";
				btnDisplayNext.style.width = "100%";
				btnDisplayNext.style.height = "24px";
				btnDisplayNext.style.position = "absolute";
				btnDisplayNext.style.backgroundColor = "white";
				btnDisplayNext.style.marginTop = -document.documentElement.scrollHeight + tblContainer.offsetTop + 60;
			} 
			else
			{
				tblContainer.style.height = height - btnDisplayNext.offsetHeight - 3 + "px";
			}
			
			btnDisplayNext.style.visibility = "visible";
		}
		else
		{
			if( inc_browserFlavor == "SAFARI" && flvMjrVer < 312 )
			{
				//Don't set any height for this old version of SAFARI
			}
			else
			{
				tblContainer.style.height = height - 3 + "px";
			}
		}
		
		tblContainer.style.visibility = "visible";
	}

}

So, there you have it. If you're running GroupWise 7 with WebAccess, I hope you find this helpful.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading ... Loading ...

Tags:
Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS