0 Replies Latest reply on Oct 28, 2010 12:50 PM by DARTHCYL0N

    problem with externalURL function over sandboxbridge

    DARTHCYL0N Level 1

      I have a simple application that I am running , I have run items through the sandbox bridge without any issue until I try to run the openExternalURL command, that one will not run, I am posting my client and the page here in hopes that someone might have come across this and have a fix for it , I am pretty sure that the fix is simple and that I am probably overlooking something small with this one LOL .

       

      If I call any of the other functions they work like a charm but if I call openExternalURL , it won't work so I am pretty sure the problem is the function openExternalURL

       

      Any ideas would be helpfull

       

      -R

       

       

      **************AIR CLIENT*********************************************************************

      <html xmlns="http://www.w3.org/1999/xhtml">

       

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

      <script src="AIRAliases.js"></script>

      <script language="javascript">

      function openExternalURL(href) {

      var request = new air.URLRequest(href);

      try {           

      air.navigateToURL(request);

      }

      catch (e) {

      }

      }

       

      function testFunction(T){

      alert(T);

      }

       

      function getUrlVars(){

      var vars = [], hash;

      var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

       

      for(var i = 0; i < hashes.length; i++)

      {

      hash = hashes[i].split('=');

      vars.push(hash[0]);

      vars[hash[0]] = hash[1];

      }

       

      return vars;

      }

       

      function noLogin(){

      alert('Your login information was incorrect, please try again');

      top.location.href="login.html";

      }

       

      var Exposed = new Object();

       

      Exposed.openExternalURL = openExternalURL;

      Exposed.getUrlVars = getUrlVars;

      Exposed.noLogin = noLogin;

      Exposed.testFunction = testFunction;

       

      function doLoad() {

      var frame = document.getElementById('viperframe').contentWindow.parentSandboxBridge = Exposed;

      setIframeHeight('viperframe');

      }

       

              </script>

      </head>

       

      <body onload="doLoad();" onresize="setIframeHeight('viperframe');" onfocus="setIframeHeight('viperframe');" bgcolor="#222222">

       

      <iframe src="processlogin.html" id="viperframe" name="viperframe" frameborder="0" scrolling="no" width="100%"></iframe>

       

      </body>

      </html>

      ********************************END AIR CLIENT*********************************************

       

       

      *******************************PAGE CALLING FUNCTION**********************************

      <script language="javascript">

           parentSandboxBridge.openExternalURL('http://www.google.com')

      </script>

       

      ****************************END PAGE CALLING FUNCTION********************************