By the way my requirement is better addressed in the AIR app example of this page: http://labs.adobe.com/wiki/index.php/Apollo:Articles:Using_HTML_in_Flex-based_Apollo_Applications
The unfortunate thing is that this example does not work!!!! I guess it was written in Flex 3 beta and these features changed since Flex 3 was released. On Wed, Jul 29, 2009 at 11:39 AM, Vivian Richard<kanps...@gmail.com> wrote: > Thanks Rohit for the link and for your reply. As I see this whole > example was written in HTML and JS, my situation is a little > different. My app is in mxml. I am using the the HTML comp like > this: > > <?xml version="1.0" encoding="utf-8"?> > <mx:WindowedApplication > xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> > <mx:HTML id="html" location="http://www.hotmail.com" > width="100%" top="0" bottom="75"/> > <mx:Button label="click" click="callJS()" bottom="0"/> > </mx:WindowedApplication> > > Now- as you understand my HTML component contains the source > html codes of the html login page. In the login page what we do is > we fill out the user name and password field and then press a the > login button. So as the button is pressed a javascript function which > is included in this login page in called and that handles the user > login validation process. > > So what I am trying to do is- I am trying to call that JS function from > Actionscript script proving the username and pass from my air app > instead of making my user going through the login process of > hotmail page. > > > > > > > On Wed, Jul 29, 2009 at 9:00 AM, rohit<rohitde...@gmail.com> wrote: >> >> http://net.tutsplus.com/tutorials/tools-and-tips/introduction-to-adobe-air/ >> >> On Jul 27, 3:56 pm, rohit <rohitde...@gmail.com> wrote: >>> use externalInterface method of actionscript >>> OR >>> u can get the javascript variable like this >>> >>> var document:Object = e.currentTarget.window.document; //(private >>> function onHTMLLoadComplete(e:Event):void) >>> >>> Rohit Bhatia >>> >>> On Jul 27, 2:03 pm, Vivian Richard <kanps...@gmail.com> wrote: >>> >>> > Hi as I load a page in my html component using <mx:HTML> >>> > component, how do I call a javascript function that is in the >>> > html content. >>> >>> > for example <mx:HTML id="html" location="http://www.google.com"/> in >>> > loaded. Now as I see in the source page in google.com there is a >>> > javascript >>> > function called SSSSSS(). I want to call that using actionscript. How do >>> > I do that? >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---