Thursday, July 10, 2008

AjaxToolKit 1.0.20229.0 ModalPopUp Extender IE 6.0 UI issue

Hi All,
In my previous post we fixed issue of AjaxToolKit ModalPopUpExtender in IE 7.0.
Now if you are using AjaxToolKit version 1.0.20229 while using ModalPopUp Extender in IE 6.0 it will add huge vertical and horizontal space in IE 6.o User can scroll vertical and horozontal to indefinite.

The solution for this is download the sorce code(DownLoad Source code) and Modify the below file

File Name: ModalPopupBehavior.js
Location : AjaxControlToolkit\ModalPopupExtender\ModalPopupBehavior.js
Function: _layoutBackgroundElement

Please comment out this lines of code only in this function

// Background element needs to cover the visible client area completely hence its
// top and left coordinates need to be 0, and if relatively positioned its getlocation
// value needs to be 0.
// if(this._isIE6) {
// var backgroundLocation = $common.getLocation(this._backgroundElement);
// var backgroundXCoord = backgroundLocation.x;
// if (backgroundXCoord != 0) {
// // offset it by that amount. This is assuming only one level of nesting. If
// // multiple parents with absolute/relative positioning are setup this may not
// // cover the whole background.
// = (-backgroundXCoord) + 'px';
// }
// var backgroundYCoord = backgroundLocation.y;
// if (backgroundYCoord != 0) {
// // offset it by that amount. This is assuming only one level of nesting. If
// // multiple parents with absolute/relative positioning are setup this may not
// // cover the whole background.
// = (-backgroundYCoord) + 'px';
// }

After commenting out these lines Rebuild the whole solution and use the newly created dll in your application

Now see the spacing issue should get resolved

Thanks & regards

AjaxToolKit 1.0.20229.0 ModalPopUp Extender IE 7.0 UI issues

Hi All,
AjaxToolKit version 1.0.20229.0 ModalPopUpExtender has some issues like it won't work in IE 7.0 . When Modal PopUP is shown it disturbed the whole UI of Page. I got fix for it for which just download the AjaxTool kit source code DownLoad Source Code and modify with following files with given code.

1. IE 7.0 UI Issue. (i.e UI was getting totally disturbed after populating the Modal pup )
File Name: Common.js
Location: AjaxControlToolkit\Common\Common.js
Function: getClientBounds

Replace the switch statement with the following one:

switch(Sys.Browser.agent) {case Sys.Browser.InternetExplorer:if (document.documentElement && document.documentElement.clientWidth)clientWidth = document.documentElement.clientWidth;else if (document.body)clientWidth = document.body.clientWidth;//clientWidth = document.documentElement.clientWidth;if (document.documentElement && document.documentElement.clientHeight)clientHeight = document.documentElement.clientHeight;else if (document.body)clientHeight = document.body.clientHeight;//clientHeight = document.documentElement.clientHeight;break;case Sys.Browser.Safari:clientWidth = window.innerWidth;clientHeight = window.innerHeight;break;case Sys.Browser.Opera:clientWidth = Math.min(window.innerWidth, document.body.clientWidth);clientHeight = Math.min(window.innerHeight, document.body.clientHeight);break;default: // Sys.Browser.Firefox, etc.clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);break;}

2. IE 7.0 issue Modal Pop up Position was not absolute
File Name: ModalPopupBehavior.js
Location: AjaxControlToolkit\ModalPopupExtender\ModalPopupBehavior.js
Function: initialize
(Line number might be 113 )
a. Check for this statement = 'fixed';change it to = 'absolute';//'fixed';
b. A few lines below that is another change that has to be made from: (Line number 125 ) = 'fixed';
to: = 'absolute';//'fixed';

Now build the AJAXtoolKit solution use its newly created dll instead of old one.
Now you will see the IE 7.0 UI issue got resolved.

But there is still one more Issue that is with IE 6.0 Flickering of background that I have resolved ine my next post please see my Next post