1 Reply Latest reply on Feb 12, 2008 5:57 AM by Dongyao Zhao

    z-order

    Dongyao Zhao Novice

      i have a web page in richfaces and java with a third party object reflected on the page. I have incorporated Javascript Menuing code to try to expose a rich:contextMenu"Right Mouse Context Menu" which would be "On Top" of all other items on the web page.

      problem:

      When I execute the rightclick, the menu displays nicely, but it is behind the "third party object", afterwards it works fine, above the "third party object".

      javascript function code:

      function contextMenu(evt, target)
       {
       var idPaintarea1 = this.document.getElementById("paintarea1");
       var elem = idPaintarea1.firstChild.lastChild.firstChild;
       elem.style.zIndex="20000";
       }
      


      jsf code:
      
      <rich:contextMenu id="contextMenuId" event="oncontextmenu" submitMode="none"
       onexpand="contextMenu(event,this)" >
       <rich:menuItem id="properties" value="Show Property" submitMode="ajax" >
      
       <a4j:actionparam name="devicePhysName" assignTo="#{ctrl.selectedDevicePhysName}" value="#{item.dataItem.physName}" />
      
       </rich:menuItem>
       <rich:menuItem value="Show Connections" />
       </rich:contextMenu>