Return value from ExternalInterface.call method

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Return value from ExternalInterface.call method

    Hi people,
    I can not achieve to get any return value from javascript other than
    null.
    In th HTML container I have a functions like this:

    function f(p)
    {
    alert(p);
    return(p);
    }

    In my flex app I call the browser function in the following way:

    var ret:*;
    ret = ExternalInterface.call( "f", "Hello" );
    Alert.show( ret.toString() );

    I get an alert in the browser saying "Hello" and another Alert from
    flex saying "null".

    What's wrong?... I think that I should get two alerts shown, no?



    prdv Guest

  2. Similar Questions and Discussions

    1. Problem with ExternalInterface.call and InternetExplorer
      Hi, I´m developing a site, (http://www.gen-studio.com/avelart2/), and I´m using a swf to display a set of thumbs that when clicked show an item and...
    2. Type Error with ExternalInterface.call();
      Hi... I am calling javascript function of wrapper from flex. The funcation is called but when it return a value , the value is not returned to...
    3. ExternalInterface.call performance question
      Hi, I'm using Flash 8, using XML.Load to get some data from another site and returning it to the browser world thru a callback using...
    4. using the 'call()' method
      hey everyone! :) i have this method comms server-side: clientObj.copyFile_Result = function( str ) { trace( "copyFile_Result: ", str ) ;...
    5. HOW TO? declarate the xml-schema of return values from method call
      Is there a way to make the following: 1. we have a webmethod, that should return an xml document that is valid respect our XmlSchema. 2. the web...
  3. #2

    Default Re: Return value from ExternalInterface.call method

    Hi,
    I Finally found that the problem was related to the fact that the HTLM wrapper
    did not have the <object> tag (it only had the <embed> tag)
    I setup, both, the embed and object tags and now ExternalInterface.call
    returns the right value under MSIE and FireFox.

    Thanks a lot for your suggestions.

    prdv Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139