[ 
https://issues.apache.org/jira/browse/WICKET-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779916#action_12779916
 ] 

Rasmus Sööt commented on WICKET-1432:
-------------------------------------

Currently ajax doesn't work with IE if browser has High security settings and 
Javascript is enabled.  The problem is, that on High security settings ActiveX 
is only enabled for trusted sites.
To reproduce:
In IE7 or IE8 select Tools->Internet Options -> Security tab-> Set security 
level for Internet to High-> Click Custom level-> Scroll down to Scripting and 
set Active scripting to Enable-> Click OK, Yes, OK-> Open URL 
http://www.wicket-library.com/wicket-examples/ajax/editable-label -> Click on 
multiple lines of textual content - Text box does not open and IE gives the 
following error:
Message: Automation server can't create object
Line: 669
Char: 10
Code: 0
URI: 
http://www.wicket-library.com/wicket-examples/ajax/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js

Could somebody look into this? I'm not familiar with the codebase, maybe 
something depends on having ActiveXObject for IE. Microsoft suggests using 
XMLHttpRequest  in IE7+ too, from 
http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx -
To support versions of Internet Explorer prior to Internet Explorer 7, use the 
following function to get the XMLHttpRequest object:
function getXMLHttpRequest() 
{
    if (window.XMLHttpRequest) {
        return new window.XMLHttpRequest;
    }
    else {
        try {
            return new ActiveXObject("MSXML2.XMLHTTP.3.0");
        }
        catch(ex) {
            return null;
        }
    }
}

> Detection of ajax transport type
> --------------------------------
>
>                 Key: WICKET-1432
>                 URL: https://issues.apache.org/jira/browse/WICKET-1432
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>         Environment: Windows Mobile + Opera Mobile 9.5 Beta
>            Reporter: Sven Rienstra
>            Assignee: Matej Knopp
>            Priority: Minor
>
> Wicket currently detects wich type of ajax transport has to be used by 
> detecting if the browser supports activeX. Wouldn't it be better to use 
> activeX only if the browser is IE and lower than version 7, because as far as 
> I know that's the only browser you would want to use activeX on. 
> The reason i'm asking is because i'm testing with the new Opera Mobile 
> browser (9.5 beta), ajax isn't working because wicket tries to use an activeX 
> object. I fixed this for now in my own enviremont but maybe it's good to 
> change this in a future release ?
> Patch file:
> Index: wicket-ajax.js
> ===================================================================
> --- wicket-ajax.js    (revision 638254)
> +++ wicket-ajax.js    (working copy)
> @@ -652,7 +652,7 @@
>       // Creates a new instance of a XmlHttpRequest
>       createTransport: function() {
>           var transport = null;
> -         if (window.ActiveXObject) {
> +         if (Wicket.Browser.isIELessThan7()) {
>               transport = new ActiveXObject("Microsoft.XMLHTTP");
>           } else if (window.XMLHttpRequest) {
>               transport = new XMLHttpRequest();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to