beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers (JIRA)" <...@beehive.apache.org>
Subject [jira] Created: (BEEHIVE-1018) Using runAtClient (XmlHttpRequest) for expanding a tree doesn't work when a node label contains a <script> tag.
Date Fri, 02 Dec 2005 20:58:31 GMT
Using runAtClient (XmlHttpRequest) for expanding a tree doesn't work when a node label contains
a <script> tag.
---------------------------------------------------------------------------------------------------------------

         Key: BEEHIVE-1018
         URL: http://issues.apache.org/jira/browse/BEEHIVE-1018
     Project: Beehive
        Type: Bug
  Components: NetUI  
    Versions: V1    
 Environment: Mozilla or Firefox
    Reporter: Carlin Rogers
 Assigned to: Carlin Rogers 
     Fix For: 1.1


The beehive JavaScript in the netui-tree.js file for XmlHttpRequest expansion/contraction
of tree nodes fails for nodes containing JavaScript in the label. This is a Mozilla/Firefox
specific issue.

It seems that in our JavaScript for NetUI tree node expansion via XmlHttpRequest, Mozilla/Firefox
pull the <script> element out of the tree node <div> element and makes it a sibling.
The NetUITreeXmlHttpRequestReturn() routine takes the CDATA nodeValue from the XML of the
response, which is a String with the HTML markup for the tree node <div> element, and
assigns it to the innerHTML of a new node we've created in the current page DOM...

var txt = getCData(treeDivs[j]);
...
var pElement = document.createElement("div");
pElement.innerHTML=txt.nodeValue;

With Mozilla/Firefox, the above assignment to pElement.innerHTML creates child nodes for a
script as well as a div element. The NetUITreeXmlHttpRequestReturn() routine assumed that
there is just one element, a div.

We can modify the NetUITreeXmlHttpRequestReturn() routine to handle the additional script
element.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message