History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1997
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jen Bourey
Reporter: Karl Isenberg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
uPortal

Ajax skin selection doesn't work in IE (dynamic radio button bug)

Created: 03/Apr/08 07:53 PM   Updated: 30/May/08 08:09 PM
Component/s: User Interface, AJAX
Affects Version/s: 2.6.1
Fix Version/s: 2.6.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Tested with Internet Explorer 6 (win2k) & 7 (winXP)


 Description  « Hide
The dynamically created radio buttons in the modal skin selection window cannot be checked in IE.

The problem seems to be an IE bug.
Discussion of the error can be found: http://cf-bill.blogspot.com/2006/03/another-ie-gotcha-dynamiclly-created.html

I used a slightly different solution. Since I've been checking for IE elsewhere I've defined the following 'IE' variable in the head of xhtml-theme.xsl above the javascript external file links.

        <script type="text/javascript">IE = false;</script>
        <xsl:comment>[if lt IE 8.]&gt;
          &lt;script type="text/javascript"&gt;
            <xsl:text>IE = true;</xsl:text>
          &lt;/script&gt;
        &lt;![endif]</xsl:comment>


Then in ajax-preferences.js inside initializeSkinSelection() I've replaced the input definition with the following:

          var input
          if (IE) {
            if (key == currentSkin) {
              input = document.createElement('<input type="radio" name="skinChoice" value="'+key+'" checked="true" />');
            } else {
              input = document.createElement('<input type="radio" name="skinChoice" value="'+key+'" />');
            }
          } else {
            input = document.createElement("input");
            input.type = "radio";
            input.value = key;
            input.name = "skinChoice";
            if (key == currentSkin)
                input.checked = true;
          }


This seems to work in IE 6 & 7, Firefox, Safari and Opera. I haven't been able to test IE8 yet.

 All   Comments   Work Log   Change History      Sort Order:
Karl Isenberg [05/May/08 02:32 PM]
Decided to use dojo.render.html.ie instead of the global IE var.

Jen Bourey [30/May/08 08:09 PM]
Fixed in uPortal 2.6 patched branch. A patch similar to what was provided was applied, except we're using dojo's built-in browser detection functionality.