2 Replies Latest reply on Oct 26, 2010 8:16 AM by jcastelain

    mx:HTML component not loading a webpage

    jcastelain Level 1

      Hi all,

       

      I'm using the mx:HTML component in an AIR app and I have a problem loading a specific page

      The problem is that the page loads but "never completes"

       

      The URL is this one :
      http://secure4.gatewayticketing.com/PeterPanBus/Transportation/ETickets.aspx?Merchant=tran web&CategoryGroupExternalID=5&CategoryExternalID=1&__utma=1.2132906629.1287395837.12873958 37.1287399880.2&__utmb=1.1.10.1287399880&__utmc=1&__utmx=-&__utmz=1.1287395837.1.1.utmcsr= (direct)|utmccn=(direct)|utmcmd=(none)&__utmv=-&__utmk=174754978

       

      The code for this application is really basic, but I thought positing it in the thread might avoid people replying to ask me for it :

       

      <?xml version="1.0"?>
      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:mx="library://ns.adobe.com/flex/mx"
           xmlns:s="library://ns.adobe.com/flex/spark"
           minWidth="800" minHeight="600">
      
          <fx:Script>
              <![CDATA[
                  import mx.events.FlexEvent;
      
                  private function urlInputEnterHandler(event:FlexEvent = null):void {
                      if(urlInput.text.length > 1) {
                          html.location = urlInput.text;
                          urlInput.enabled = false;
                      }
                  }
      
                  private function htmlCompleteHandler(event:Event):void {
                      trace("htmlCompleteHandler : ", html.location);
                      urlInput.enabled = true;
                  }
      
                  private function htmlDOMInitializeHandler(event:Event):void {
                      trace("htmlDOMInitializeHandler : ", html.domWindow);
                  }
      
                  private function htmlRenderHandler(event:Event):void {
                      trace("htmlRenderHandler : ", event);
                  }
      
                  private function htmlLocationChangeHandler(event:Event):void {
                      trace("htmlLocationChangeHandler : ", event);
                  }
      
                  private function htmlUncaughtScriptExceptionHandler(event:HTMLUncaughtScriptExceptionEvent):void {
                      trace("htmlUncaughtScriptExceptionHandler : ", event.stackTrace);
                  }
              ]]>
          </fx:Script>
      
          <s:layout>
              <s:VerticalLayout horizontalAlign="center"
                  verticalAlign="top" />
          </s:layout>
      
          <s:TextInput id="urlInput" enter="urlInputEnterHandler()" width="100%" />
          <mx:HTML id="html" width="100%" height="100%"
              complete="htmlCompleteHandler(event)"
              htmlDOMInitialize="htmlDOMInitializeHandler(event)"
              htmlRender="htmlRenderHandler(event)"
              locationChange="htmlLocationChangeHandler(event)"
              uncaughtScriptException="htmlUncaughtScriptExceptionHandler(event)"
              />
      </s:WindowedApplication>
      

       

      Any help would be appreciated,

      Thanks

       

      Julien