Tuesday, May 01, 2007

Windows Vista Fix for QuickPlace 7.0

In Windows Vista, the DHTML activeX control was removed due to security concerns. The DHTML control was an easy to use Rich Text editor that could turn any Rich Text entered into HTML. QuickPlace has used this control since version 1 as did many other applications.
QuickPlace has a rather simple test that assumes if ActiveX works, then the DHTML control can be used. In Vista this is no longer true, so we have coded up a change that puts an extra test to make sure Vista is not being used before DHTML is applied.
These changes need to be applied to the HaikuCommonForms.ntf file under your QuickPlace/AreaTypes directory on the server (and will be overwitten during any upgrade or hotfix application so you must reapply as needed).
qpbase form:

this.isPlatformWin = isPlatformWin_ClientBrowserObject;
...
function isPlatformWin_ClientBrowserObject ()
{
logEnter("isPlatformWin_ClientBrowserObject");
return ((this.m_clientPlatform.indexOf("Win") != -1) ? true : false);
logExit("isPlatformWin_ClientBrowserObject");
};
...
if (h_ClientBrowser.hasActiveX ())
formObj.fieldDef[y] = new _IERichTextControlField;

becomes:

this.isPlatformWin = isPlatformWin_ClientBrowserObject;
this.isPlatformVista = isPlatformVista_ClientBrowserObject;
...
function isPlatformWin_ClientBrowserObject ()
{
logEnter("isPlatformWin_ClientBrowserObject");
return ((this.m_clientPlatform.indexOf("Win") != -1) ? true : false);
logExit("isPlatformWin_ClientBrowserObject");
};
function isPlatformVista_ClientBrowserObject ()
{
logEnter("isPlatformVista_ClientBrowserObject");
return ((navigator.appVersion.indexOf("Windows NT 6.0") != -1) ? true : false);
logExit("isPlatformVista_ClientBrowserObject");
};
...
if (h_ClientBrowser.hasActiveX ())
if (h_ClientBrowser.isPlatformVista()){
formObj.fieldDef[y] = new _SimpleTextControlField();
} else {
formObj.fieldDef[y] = new _IERichTextControlField;
}

6 Comments:

Blogger ian connor said...

You might also test directly for the DHTML object with this code:

new ActiveXObject('DHTMLSafe.DHTMLSafe.1')

as it returns an object if it works and error when it fails

12:10 PM  
Blogger Peter said...

You may be able to resolve on the client side. See the download referred to here Replacing the DHTML Editing Control in Windows Vista and Beyond

3:26 PM  
Blogger Peter said...

Further, i think it will not work actually: the download page referred to in the doc i refer to says "The “for Applications” version of the control can be used with client applications, but cannot be loaded inside Internet Explorer."

Worth a PMR at least and a hotfix would be great. IBM have to understand that esp in your environment, browser compatability is a moving target and they need to be nimble.

3:35 PM  
Blogger ian connor said...

This is no long a problem Quickr 8 as they use the DOJO editor. So, in Quickr this fix is not needed for Vista.

6:02 AM  
Blogger maan said...

This post has been removed by the author.

5:48 AM  
Blogger maan said...

Hello,

We are also experiencing with importing Office 2003 and 2007 documents under Vista. It seems that the TEMP directory is not available, even though it should be. Apparently, Lotus support reproduced and also do our customers. However, Lotus does not provide a hotfix for the moment. Anybody having the issue and/or ideas for a solution ?

Best regards,
Anton

5:49 AM  

Post a Comment

<< Home