7 Replies Latest reply on Apr 7, 2011 3:26 PM by iabughosh

    Permission Denied Error

    Anil Kumar Newbie

      Hi,

       

      I'm facing "Permission denied" java script error in my jsf page only for IE browsers.

       

      Please let me know if any one has solution for this.

       

      Thanks in Advance.

       

      Best Regards,

      Anil Kumar A

        • 1. Permission Denied Error
          iabughosh Master

          hi Anil,

          please give us more details, did you use popup windows or window.opener methods ??

          • 2. Permission Denied Error
            Anil Kumar Newbie

            I have used javascript to click a4j:commandLink onload of the page, It works fine in Firefox where it does not work on IE browser and gives Permission Denied java script error.

             

            This error does not occur all the time, occurs only sometimes.

             

            Thank you.

             

            Best Regards,

            Anil Kumar A

            • 3. Permission Denied Error
              iabughosh Master

              What JSF version you are using ???, please give me a snapshot of your JavaScript Code .

              • 4. Permission Denied Error
                Anil Kumar Newbie

                I'm using JSF 1.0 and RichFaces 3.0.1. Scenario is expanding the rich tree onload of the page instead of clicking a button to expand the rich tree.

                 

                Since there is no attribut for rich tree to expand the tree by default, hence by using following JavaScript code, clicking the button to expand the rich tree onload of the page.

                 

                var fireOnThis = document.getElementById('quoteform:link_cop')

                var fireOnThis1 = document.getElementById('quoteform:link_pop')

                  if (document.createEvent)

                  {

                    var evObj = document.createEvent('MouseEvents')

                    evObj.initEvent( 'click', true, false )

                    fireOnThis.dispatchEvent(evObj)

                     var evObj1 = document.createEvent('MouseEvents')

                    evObj1.initEvent( 'click', true, false )

                    fireOnThis1.dispatchEvent(evObj1)

                  }

                  else if (document.createEventObject)

                  {

                    fireOnThis.fireEvent('onclick')

                    fireOnThis1.fireEvent('onclick')

                  }

                • 5. Permission Denied Error
                  iabughosh Master

                  Dear Anil,

                  i tried your script and it is not working with me, but there is another solution, you can call a hidden button within onLoad function and its actionlistener

                  like this :

                   

                  public void myActionListener(ActionEvent ae) {

                                      UIComponent comp = FacesContext.getCurrentInstance().getViewRoot().findComponent("myForm:tree");

                                      HtmlTree tree = (HtmlTree)comp;

                   

                                      tree.queueExpandAll();

                            }

                   

                  it will expand your tree.

                  • 6. Permission Denied Error
                    Anil Kumar Newbie

                    Hi Ibrahim,

                     

                    Thanks for your suggestion, I have already tried this approach earlier which does not work.

                     

                    I think there would not be any differnce between clicking the button which is hidden compare to shown button.

                     

                    Thanks & Regards

                    Anil Kumar

                    • 7. Permission Denied Error
                      iabughosh Master

                      Hi Anil,

                      I've tried this approach and it worked fine with me, what JSF & RichFaces you are using ??