2 Replies Latest reply on Jan 5, 2009 3:22 AM by rahimhaji

    navigatetoURL with Javascript

    rahimhaji Level 1
      Dear friends,

      i have developed an AIR application, in that i have linked a help html page while clicking on a help button: for that i used the following code:

      function helpclick(event:MouseEvent) {
      var address:String = " http://www.link.com/index.html";
      var jscommand:String = "window.open('" + address + "','PopUpWindow','height=645,width=755,toolbar=no,scrollbars=no,resizable=yes');";
      var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");

      it is giving error like this:

      SecurityError: Error #2121: Security sandbox violation: navigateToURL: app:/ArabianBusinessLive.swf cannot access javascript:window.open(' http://www.link.com/index.html','PopUpWindow','height=645,width=755,toolbar=no,scrollbars= no,resizable=yes'); void(0);. This may be worked around by calling Security.allowDomain.
      at global/flash.net::navigateToURL()
      at rt/helpclick()[rt::frame1:33]

      Kindly help me to solve this, i got struct up..i need to solve this urgent...

      Thanks in advance,
      Syed Abdul Rahim