3.2.0

Please help -- Combo widget over https causes "Permission Denied" Javascript error

Our webapp contains a document download section, where community administrators can select operations from a dropdown list to affect selected documents (such as Copy, Delete, Change Access Level, etc). This list is implemented using a Combo widget. However, one of our users is reporting a recurring problem, in which clicking the dropdown has no effect except to produce a "Permission Denied" Javascript error.

The problem is that I can't reproduce the error -- the dropdowns work fine for me. This makes debugging pretty much impossible on my end alone. So, to try to find the cause of the error, I created two simple HTML pages, one using a standard HTML <select> dropdown, and the other using an ActiveWidgets dropdown. I sent these two pages to the user, and he reported that both of them worked fine.

I then uploaded the two files to our download page, and instructed him to open the pages directly from there (which would mean accessing them through an https domain). This time, he reported that the page using the standard HTML dropdown worked, but the one using the Combo widget produced the error.

Therefore, we came to the conclusion that the problem only occurred when using the ActiveWidgets Combo through an https domain. Something in this user's network settings, firewall, or whatever, must be preventing AW from working over https.

Unfortunately, that still doesn't provide us with a solution. I've already searched through the forums, but I can't find an answer. The test pages reference the AW files through relative URLs, and I don't think there's any cross-domain scripting involved. We also tried enabling the "Access data source across domains" option (as suggested in another thread), but that didn't help either. At this point, I'm all out of ideas; I'm hoping that someone here can shed some light on this issue.
Jared
May 19,
Here is the test page I made. This page was accessed through our download servlet, as follows: https://serverroot.com/DownloadProject/download?uploadID=1234

<html>
<head>
    <title>Combo Widget Test</title>
    <link href="/DownloadProject/downloadProject/js/ActiveWidgets/runtime/styles/classic/aw.css"
          rel="stylesheet" type="text/css"></link>
    <script src="/DownloadProject/downloadProject/js/ActiveWidgets/runtime/lib/aw.js"></script>
    
    <style>
        .active-column-0 {display: none!important;}  
        .aw-templates-link{color: blue; font-size: 10px; font-family: Verdana;}
        .aw-ui-link{color: blue; font-size: 10px; font-family: Verdana;}

        .aw-grid-control { height:250px; margin: 0px; border: none; font: menu; align: center}
        .aw-grid-control .aw-column-0 {width: 400px; text-align: center }

        .aw-grid-control .aw-row-selector {width: 32px; text-align: center}
        .aw-grid-control .aw-alternate-odd {background: #FBEAB5;}
        .aw-grid-control .aw-grid-cell {border-right: 1px solid threedlightshadow;}
        .aw-grid-control .aw-grid-row {height: 20px; border-bottom: 1px solid threedlightshadow;}
        .aw-grid-control .aw-mouseover-row .aw-row-selector {color: red;}
        .aw-mouseover-row {background: #B9FFB9;}

        /******Grid******/
        .aw-grid-control-header-0-1 {color: brown}
        .aw-header-0 .aw-item-box {background:#cdcdcd;border-bottom-color:#c4c4c4;}
        .aw-header-0 .aw-grid-header {background:#b7b7b7!important;border-bottom-color:#adadad;}

        .aw-header-0 .aw-mouseover-header
        { 
            border-bottom-color: #f9b119; 
            background: #B9FFB9!important; 
        }
        .aw-header-0 .aw-mouseover-header .aw-item-box
        { 
            border-bottom-color: #f9a900; 
            background: #FCC418; 
        }

        .aw-grid-control { width: 250px }

        /******Headers******/
        .aw-grid-control .aw-grid-headers {color: blue}
        .aw-grid-control .aw-mouseover-header {color: red;}
        .aw-grid-control .aw-mousedown-header {color: yellow;}

        /******Row Selectors******/
        .aw-grid-control .aw-row-selector {width: 20px; text-align: center}
        .aw-grid-control .aw-row-2 .aw-row-selector {font-weight: bold}
        .aw-grid-control .aw-mouseover-row .aw-row-selector {color: red;}

        .aw-grid-control .aw-mouseover-selector {background: green;}
        .aw-grid-control .aw-mousedown-selector {background: yellow;}
    </style>
</head>
<body onload="resetCombo();" bgcolor="#ffffff" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" class="scroll" >

    <script>
        //------------------------------------------------------------------
        //Values
        //------------------------------------------------------------------
        var comboValues = [ "move",
                            "copy",
                            "releaseWith",
                            "releaseWithout",
                            "unrelease",
                            "delete",
                            "changeAccessLevel",
                            "publicRelease",
                            "publicUnrelease" ];
        var comboLabels = [ "Move",
                            "Copy",
                            "Release With Notification",
                            "Release Without Notification",
                            "Unrelease",
                            "Delete",
                            "Change Access Level",
                            "Release to General Public",
                            "Unrelease from General Public" ];
        var comboTooltips = [ "Move selected document(s) to another community",
                              "Copy selected document(s) to another community",
                              "Release selected document(s) with notification",
                              "Release selected document(s) without notification",
                              "Unrelease selected document(s)",
                              "Delete selected document(s)",
                              "Change access level for selected document(s)",
                              "Make selected document(s) available to the general public",
                              "Make selected document(s) unavailable to the general public" ];
                           
                           
        //------------------------------------------------------------------
        //Combo widget
        //------------------------------------------------------------------
        var combo = new AW.UI.Combo;
        combo.setId("myCombo");

        combo.setItemCount(9);
        combo.setItemValue(comboValues);
        combo.setItemText(comboLabels);
        combo.setItemTooltip(comboTooltips);
        
        combo.setControlText("--Combo Widget--");
        combo.onSelectedItemsChanged = function(items)
        {
            this.setTimeout(
                function()
                {
                    alert('selected "' + this.getItemText(items[0]) + '"');
                }
            );
        }
        
        combo.setStyle("width", "250px");
        combo.getContent("box/text").setStyle("font-size", "11px");
        combo.getContent("box/text").setStyle("font-family", "Verdana");
        combo.getContent("box/text").setStyle("cursor", "default");
        combo.getPopupTemplate().setStyle("width", combo.getStyle("width"));
        
        combo.getContent("box/text").setAttribute("readonly", true);
        combo.onControlActivated = function()
        {
            return true;
        }
        combo.onControlEditStarted = function()
        {
            this.getContent("box/text").element().contentEditable = false;
        }
        combo.onControlClicked = function()
        {
            this.showPopup();
        }
        
        
        //------------------------------------------------------------------
        //Display combo
        //------------------------------------------------------------------
        document.write("<br><br>");
        document.write("<table border='0' width='100%'>");
        document.write("<tr><td width='3%'></td>");
        document.write("<td width='97%' align='left'>");
        document.write(combo); 
        document.write("</td></tr>");
        document.write("</table>");
        
        
        function resetCombo()
        {
            combo.refresh();
        }
    </script>

</body>
</html>
Jared
May 19,
I don't see anything wrong in this code and unfortunately I don't have any suggestions what can trigger this problem.

The combo control uses window.createPopup() method in IE. Then it creates popup content with document.write() methods. Normally this should not create any problems because the new document still has the same URL as the parent one.

If I understand correctly - the same code works ok on other PCs. Could it be some kind of a custom IE build where createPopup is disabled? Or some antivirus tool which does this?
Alex (ActiveWidgets)
May 21,
The user reports that other people within his organization also have this problem, so it's probably a problem with their group's network settings or firewall, or something like that.

I don't think it's a problem with IE or a local antivirus tool. As I said, the first test was to send him the HTML files directly, and have him open them from his desktop. That worked fine, which means the AW Combo itself works ok for him in IE. It's only when he opened it through the https site that the error occurred. Hence, the problem must be network-related, not computer-related.

Another thing to consider is that the FIRST test file (which used a standard HTML <select> dropdown) worked both on his desktop and on the server. That test file just shows a Javascript alert when you click an item from the dropdown, and the alert worked fine as well; this means that the problem can't be related to Javascript as a whole. So there must be something unique to AW that is blocked by their network.

Any idea what that could be? And is there a way around it? Or will I just have to revert to using a standard <select> dropdown to fix this issue?
Jared
May 21,
Anyone? Please?
Jared
May 27,
Do you have any network guys that can check firewall logs etc.? https uses a different port to http, I believe.
Anthony
May 27,
Actually looking in the log files might be a good idea. I would start with local windows log and antivirus logs.
Alex (ActiveWidgets)
May 27,
Would he need the network guys to look at the Windows & antivirus logs, or are those on his own computer?
Jared
May 27,
There are probably two things that need be done.

Look at one of the desktops to see if its a desktop issue. Any of your PC support people can do that (do you have remote access?).

Look at the firewall server to see if there is anything relevant there.

Another thing to try is a different browser. FireFox has a decent debugger for it called FireBug. Although I recently found one for IE7 called DebugBar. Note, I'm not saying you need to use a debugger but, if it comes to it ...
Anthony
May 30,

This topic is archived.

See also:


Back to support forum