flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-34528) get Application.id returning Application.Name
Date Fri, 05 Sep 2014 11:48:29 GMT
Jan created FLEX-34528:

             Summary: get Application.id returning Application.Name
                 Key: FLEX-34528
                 URL: https://issues.apache.org/jira/browse/FLEX-34528
             Project: Apache Flex
          Issue Type: Bug
          Components: Spark Components
    Affects Versions: Apache Flex 4.14.0
         Environment: Mac, Windows, nearly Everywhere
            Reporter: Jan

I created a Flex Web Application where I need to give the app focus.
Btw. ts is for some internally, kinda a User configuration.
In my html document stands:
            var ts=7;
            var attributes = {};
            attributes.id = "program";
            attributes.name = "program?ts=" + ts;
            attributes.align = "middle";
                "program.swf?ts=" +ts, "flashContent", 
                "100%", "100%", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");

So I used this line to set Focus within pMain:
ExternalInterface.call("function() { var app = document.getElementById('"+id+"'); app.tabIndex
= 0; app.focus(); }");

But the id (from spark.components.Application get id) is returning:
And the focus isn't set.

But if I write:
ExternalInterface.call("function() { var app = document.getElementById('program'); app.tabIndex
= 0; app.focus(); }");
The focus is set.

spark.components.id is a get Function for ExtenalInterface, but its getting the name of the
application and not the id set in Javascript.

This message was sent by Atlassian JIRA

View raw message