Javascript ajax loaded in adobe air

Hello to all,
I come on this forum because i meet a problem with AJAX and JAVASCRIPT.
In my main script of ADOBE air, i load with "Ajax" the javascript contents but this javascript not execute not.
All my functions are in the < head > only the calls are in the contents
in charge of contents loaded with and the functions are called by onclick.
That here is my  script for the forum, but is characteristic of my problem:
<head>
<script type="text/javascript">
function getRequeteHttp() {
////the contents was supprimed for the example////
function sendRequete(url) {
////the contents was supprimed for the example////
function receiveReponse(requeteHttp) {
if (requeteHttp.readyState==4) {
(requeteHttp.status==200) {
visibleReponse(requeteHttp.responseText);
else {
alert("error");
function visibleReponse(rep) {
document.getElementById("back2").innerHTML=rep;
function action() {
sendRequete('tryscript.html');
function yiu(){
alert('rooooooo');
</script>
</head>
<body style="margin:0px;padding:0px;font-family:'Trebuchet MS';background:gray;" >
<div>
<input type="button" value="click" onclick="action();" />
<div id="back2">
<!--Contents loaded with ajax-->
<input type="button" value="click2" onclick="yiu();" />
<!---->
</div>
</div>
</body>
</html>
Thank you for your assistants and forgiveness for my English

Thank you for your answer,
I'll go to read content's  links, once this made, i'll come back to explain my new situation.
Cordially, thank you one more time.

Similar Messages

  • ERROR: Module load completed but symbols could not be loaded for Adobe AIR.dll

    Does anyone know what causes this error? The application installed on my machine is using Adobe Air.dll version 2.0.3.13070
    This dump file has an exception of interest stored in it.
    The stored exception information can be accessed via .ecxr.
    (2b84.2908): Application hang - code cfffffff (first/second chance not available)
    eax=00000000 ebx=05105dbc ecx=0c013503 edx=00002b84 esi=77f15b70 edi=00000002
    eip=00a68972 esp=0012e03c ebp=00000000 iopl=0         nv up ei pl zr na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00040246
    Unable to load image c:\Program Files\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for Adobe AIR.dll
    *** ERROR: Module load completed but symbols could not be loaded for Adobe AIR.dll
    Adobe_AIR+0x58972:
    00a68972 8bec            mov     ebp,esp

    Hi,
    Check weather its right path or not.Even check the call interface,weather you are giving the right one or not.
    Regards,
    Srikanth

  • JQuery AJAX vs. Adobe AIR AJAX Class

    Hi,
    I would like to use jQuery for my next project, and as you know, jquery comes with an included AJAX module, but i could also use the ajax class provided with adobe air. Which one should i better use it ? I've worked before with jQuery and so i'm more familiar with this library.
    Is there a difference between Adobe AIR AJAX Class and jQuery's AJAX ?
    Thank you,
    Alex

    I've seen a tutorial such as this:
    $("#loginbtn").click(function(){ 
    params = 'username='+$("#username").val()+'&password='+$("#password").val(); 
    request = new air.URLRequest(server + 'loginService.php'); 
    request.data = params; 
    request.method = air.URLRequestMethod.POST; 
    loader = new air.URLLoader(); 
    loader.addEventListener(air.Event.COMPLETE, loginComplete); 
    try { 
       loader.load(request); 
    } catch (error) { 
       alert("Error connecting to login server."); 
    and i am saying that you could do the same thing in jQuery.
    Is there any advantage in using AIR's AJAX Class ?
    Thank you for your support.
    Sincerely,
    Alex

  • HTML file loading in Adobe Air + ProgressBar?

    I am developing an AIR application. In that few reports I am showing. I am using HTML files to show the report.
    Action script is preparing/Writing the report contents into a file/
    I am using mx.controls.HTML to show the html file. Since the HTML file is little bigger in 512 MB RAM machine ( when I am running the air app)
    its taking 95%cpu when the page is getting rendered for a long time. Its making other applications unresponsive.
    Would it be possible to show progressbar when the HTML page is rendering?
    Regards
    Penugonda

    i created a similar thread a few weeks back http://forums.adobe.com/thread/619411?tstart=30. I was doing research on this topic for a quite long now but sadly there is no direct way of monitoring the progress of an html loader, it does not offer any progressEvent.Progress to monitor either. and what is more sad is that they haven't done anything about in the latest release of AIR either
    However all is not lost. What you can do is,monitor the progress of your URLRequest  using a URLLoader and once its complete you can use the (htmlloader object).loadString() function to render the html content loaded by the URLLoader :
    var browser:HTMLLoader = new HTMLLoader();
    var urlLoader:URLLoader = new URLLoader(new URLRequest("http://www.youtube.com/"));
    urlLoader.addEventListener(Event.COMPLETE, onUrlLoaderComplete);
    urlLoader.addEventListener(ProgressEvent.PROGRESS, onURLLoaderLoading);
    private function onURLLoaderLoading(e:ProgressEvent):void
         trace("progress = ",Math.round((e.bytesLoaded/e.bytesTotal)*100));
    private function onUrlLoaderComplete(e:Event):void
         browser.loadString(e.target.data);
    cheers!

  • Adobe AIR for HTML/JS custom Javascript Scrollbars

    Hi,
    I would like to know if it is possible to have custom Javascript scrollbars in an Adobe AIR application.
    I have tried many jQuery plugins but nothing can style the scrollbars.
    I can only style them via CSS.
    Adobe AIR supports javascript scrollbars for HTML / iFrames?

    Filed feature request on bugbase. Vote it up if you agree!

  • Display a video with adobe air

    Hi, I'm developing an html/ajax app on adobe air.
    In this app that runs in fullscreen I have 3 blocks where I show 3 different swf files. In one of this blocks I have to display a video.
    In a first attempt I wrote a little swf that loads an flv file locally (the file has been downloaded previously), but with an flv file of about 5 minutes (20Mb) the video is displayed slowly and the cpu jumps till 80/90%.
    I've thinked about display an mp4 file using this syntax, but It seems it doesn't work:
    <object width="480" height="208"
      classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
      codebase="http://www.apple.com/qtactivex/qtplugin.cab">
      <param name="src" value="../episodeIII_trl1_480x208.mp4">
      <param name="controller" value="true">
      <param name="autoplay" value="false">
    </object>
    Any idea?
    Thank you :-)
    Bye

    Hi, first thank you for your answer.
    Regarding the flv player, I'm not a flash/actionscript programmer, I wrote the following code in the actionscript, do you see something wrong?
    var url;
    if(LoaderInfo(this.root.loaderInfo).parameters.url != undefined) {
      url = LoaderInfo(this.root.loaderInfo).parameters.url;
    var customClient:Object = new Object();
    customClient.onMetaData = metaDataHandler;
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    ns.client = customClient;
    ns.play(url);
    var myVideo:Video = new Video();
    myVideo.attachNetStream(ns);
    addChild(myVideo);
    function metaDataHandler(infoObject:Object):void {
      if(LoaderInfo(this.root.loaderInfo).parameters.w == undefined) {
        myVideo.width = 300;
      } else {
        myVideo.width = LoaderInfo(this.root.loaderInfo).parameters.w;
      if(LoaderInfo(this.root.loaderInfo).parameters.h == undefined) {
        myVideo.height = 200;
      } else {
        myVideo.height = LoaderInfo(this.root.loaderInfo).parameters.h;

  • Ctrl-v key combo not working in keydown event in Adobe Air

    I am needing to capture the ctrl-c/ctrl-x/ctrl-v keys in the keydown Javascript event from within Adobe Air.
    I have managed to get the events to fire correctly.
    When I press ctrl, c, x, v, ctrl-c and ctrl-x, I get the correct corresponding keycodes. However, when I press ctrl-v, no event gets triggered.
    Is Air preventing the key presses from reaching this event in the case of ctrl-v?
    Here is the code I am using:
        document.getElementById('main_grid').addEventListener('keydown', keyDownEvent, false);
        keyDownEvent = function(e) {
            alert(e.keyCode);

    I'm surprised you get ctrl-c and ctrl-x. Do they work when you have selected text? What is probably happening is the default handler for the paste event is "swallowing" the keystroke. You could try listening for the paste event and calling the event object's preventDefault() method. (I haven't tried it, though, so I'm not positive that would allow the keystroke to be passed along.) If you are trying to create your own copy/paste functions, you might be better off listening for the copy and paste events themselves, rather than the raw keystrokes.
    Another alternative is to listen for the keystrokes on window.htmlLoader, which should get the keystrokes before they are passed to the HTML engine.

  • Incorrect functionality of Embedded tag in html page, displaying object on top of all layers of Adobe air application native window

    Title
    Incorrect functionality of embed tag in html loader for adobe air development
    Description
    Problem Description: If we had loaded youtube.com video url in a view stack and navigate to other index of stack or away from we UI screen within the same native window video or embeded tag of flash player or any other embed object will be displayed on top of all screens layer in same position of where the object should be placed in side of html loader only.
    Steps to Reproduce:
    1) go to http://get.straweb.com/StraWebBrowser/StraWebBrowser.air download and install
    2) load 2 tabs and in the 3 tab load video player of youtube.com which will a sample video
    before completing the load of 3 tab which trying to load video from youtube.com, navigate to other tabs 1 or 2 in few second once the flash player of youtube.com video player is load it will display in the current tab or UI screen.
    3) Try navigating to other tabs than youtube.com loaded tab you see the flash player is on top it stable.
    4) navigate to 3 tab and try to navigate to other tab you can observe that so how it will not show that flash player and only visible in that 3 tab which is fine.
    Actual Result: Embedded tag of html page displaying on top of all layers of Adobe air application native window
    Expected Result: Embedded tag of html page should only displayed in side htmlloader
    This you can replicate in any adobe air plugin update and on any Hardware and Environment.
    Applicable to all sdk versions of adobe air.

    Adobe Bugbase: Bug 3823839 Incorrect functionality of embed tag in html loader for adobe air development

  • Adobe AIR (JavaScript/AJAX) is dead?

    Hi all,
    I used to code in AIR for JavaScript / Ajax in v1 and v1.5 of AIR. I am trying to refresh my coding skills into this platform but there seems to be very poor knowledge base and material at the web, I am wondering whether this platform is somehow deprecated and whether only Adobe AIR (Flex) is supported.
    Can you please clarify?
    thank you,
    George

    Bump! I'd like to know, too. We have a large html/javascript app and are wanting to use it on Android or iOS, but it kinda seems like everything is Flex based now.... ???
    - Jack

  • Printing in Adobe AIR (JavaScript / Ajax) whereas skipping the print dialogue

    Hi,
    Can I do what the topic says? Basically I would like to check with a timer a URL and once something appears there I want it to be sent directly to my default printer.
    Is that possible? And if Yes, how?
    thank you,
    George

    Hi, I have not investigated exactly your problem as yet but this seems to be related to it:
    http://anirudhs.chaosnet.org/blog/2008.02.15.html
    For me it was printing only the upper-left corner
    but specifing a Rectangle for size for PrintJob.addPage() second argument fixed that
    please consult
    http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00000334.html
    for help on Rectangle. You can use geom instead of display;
    frameworks/libs/air/AIRAliases.js contains an alias directly to geom:
    air.Rectangle = window.runtime.flash.geom.Rectangle;
    so you may use directly air.Rectangle to construct the size.
    It works on AIR 1.5 as well as AIR 2 beta
    Code snippet I have used and worked:
    function doPrintAir()
        var pjob = new window.runtime.flash.printing.PrintJob;
        if ( pjob.start() )
            var poptions = new window.runtime.flash.printing.PrintJobOptions;
            var rectangle = new air.Rectangle(0, 0, 800, 800);
            poptions.printAsBitmap = true;
            /* poptions.pixelsPerInch = 300; */
            try
                pjob.addPage(window.htmlLoader, rectangle, poptions);
                pjob.send();
            catch (err)
                alert("exception: " + err);
        else
            alert("PrintJob couldn't start");
    //comment the line below if you do not want to mess with existing
    //window.print
    window.print = doPrintAir;
    this make js window.print() available for use as one would normay do.
    Let me know if this helps and fixes your problem.
    Best regards,
    Daniel Baragan - Adobe AIR Engineer

  • Javascript in Adobe air

    Hi I have an online order form page whcih uses javascript/ ajax to auto look up the database, the page works fine as a webpage, what i am trying to do is to add the page to Adobe air so that it can be used as a standalone page on a desktop to allow customers to order products using our catalogue and without having to go to the website.
    However whilst the page seems to display fine it doesn't show the javascript/ajax auto look up suggestion list, that appears when you start typing and wondered if there was anyway i could get the list to display or if Adobe air will allow me to load a page with Javascript and ajax wihtin it.
    Thanks
    Stan

    Hi Stan,
    I played a little with the page you gave me and I found the problem. When performing a lookup the server returns HTML content that contains JavaScript. As per the security model in the application sandbox, AIR will not allow you to add that HTML. Thus, the suggestions will not display at all.
    You can find more about AIR development with HTML/JavaScript at http://help.adobe.com/en_US/air/html/dev/index.html . Specifically the Security chapter ( http://help.adobe.com/en_US/air/html/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d23.html ) might be of interest to you.
    As for work-arounds to your problem, I can see two:
    Run the page in an iframe that's in the remote sandbox. Note however that in this case you will not be able to use AIR specific APIs in the page
    Modify the server code to return the suggestions in some other format (e.g. XML) and parse the response on the client. Then programatically add the needed HTML elements and event handlers. Note that if you want to add JavaScript, you still won't be able to use eval, or inline handlers (as is the case with code currently returned from the server, like<li onClick="fill1('  ANTSTOP  Pk 2');fill2('  Ant Stop Bait Station, HSE 7294(Registered for ama'); ..."></li> ) The code in red is the one that's not allowed by the security policy.
    Feel free to ask if you have any other questions.
    Mihai

  • Will Adobe AIR apps work on iOS (Javascript/HTML)?

    Hello,
    I haven't been able to find any definitive answer on whether Adobe AIR apps using Javascript and HTML can work on iOS.
    Anyone know for sure?
    And if so, what happens with the APIs available through these swfs that we currently include:
    networkInfoWrapper.swf
    servicemonitor.swf
    applicationupdater_ui.swf
    Many thanks
    Stephen

    The answer is no. Apps developed for AIR using HTML and JavaScript are not supported on iOS or other mobile platforms. The mobile platforms do include a StageWebView component that can be used to load and display HTML and JavaScript. However, it is entirely different than the HTMLLoader control used on the desktop platforms (for HTML-based AIR apps). You cannot, for example, call any AIR/Flash APIs from JavaScript running in a StageWebView. In general, very little communication is possible between your ActionScript application code and the JavaScript code running in the StageWebView object.

  • Link in Adobe AIR JavaScript app is incorrectly opening the app in the default browser

    I have a couple of links in my Adobe AIR JavaScript app that are part of the app's UI, which when clicked are causing the app to be loaded into a new tab in my default browser.
    This is only happening with two links (Save and Cancel on a form), and not all links in my UI.  The two links that are having the issue are defined in an external HTML file that I load a runtime and connect to the DOM.  The links that are defined in the main HTML file that is loaded when the app starts up do not have this problem.
    Here is how I am loading the template and plugging it into the DOM
    var win = document.createElement("div");
    var f = air.File.applicationDirectory.resolvePath("lib/partials/edit_form.html");
    var fs = new air.FileStream();
    fs.open(f, air.FileMode.READ);
    var content = fs.readUTFBytes(fs.bytesAvailable);
    fs.close();
    var template = new Template(content);
    win.innerHTML = template.evaluate(data);
    document.body.insertBefore(win, document.body.firstChild);
    The links themselves are coded like this:
    <a href="#" id="save_button" onclick="return false;"></a>
    <a href="#" id="cancel_button" onclick="return false;"></a>
    I am using the Prototype JS library to observe the 'click' event for each of these links like so:
    $('save_button').observe('click', onSave);
    $('save_button').observe('click', onCancel);
    This app shows content created by users, which can contain links to external web sites.  To get the external links to open in the browser (as opposed to inside my Adobe AIR window), I am doing the following in a script tag in the head of my main HTML file:
    window.htmlLoader.navigateInSystemBrowser = true
    I've found that if I set window.htmlLoader.navigateInSystemBrowser = false, then the issue with the Save and Cancel links described above goes away.  However, I need to have window.htmlLoader.navigateInSystemBrowser = true so that external links in the user content open up in the browser, not in Adobe AIR.
    Another piece of evidence is that the Save and Cancel links only incorrectly open a browser the first time you click on them after launching the app.  Subsequent clicks work fine and do not have the issue.
    Any ideas on why the links that are plugged into the DOM after app start up have this issue, and only the first time you click on them?

    Not sure where this comes from, but I suspect it has something to do with the security restrictions that AIR has in place, related to dynamic JS evaluation after the document is loaded.
    Make sure you read http://help.adobe.com/en_US/air/html/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7f0e.html#WS 5b3ccc516d4fbf351e63e3d118666ade46-7ef8
    For example, I've spotted the two onclick="return false;" you have in your code. The evaluation of the onclick attribute after the page loaded event would fail in AIR.

  • Adobe air distribution problem. (AJax / html)

    Hi guys,
    I have written a sample application in javascript (ajax) and xhtml and successfully published with adobe air. The system works fine but my question is when i distribute the application (.air) I had to include all my javascript , images, xhtml. I dont have any problem in sending the images with .air package but sending javascript files is imposible that is be because, since im using ajax to show all the details I have to use full URL for all my ajax calls.
    so someone who knows about abobe air can use those same URL`s and create their own air application and steal my details from my server. (adobe air allow cross scripting)
    As a solution I have seen many applications (ex: ebay desktop) uses flash logins and check the login using flash and redirect user to a seperate page if the login is successful. so in this case i only need to package my .swf file since redirection will handdle from the flash end.
    Im not a flash developer so I wont be able to create the whole application using flash. thats why im looking for a javascript / html solution to overcome this problem.
    so my questions are,
    1. Is there any way i can publish my .air application without packaging js files?
    2. Is there is a posibility which i can use a flash login and if the login success open up a new window with the actual application and close the login window? and while logging off viseversa
    I hope you guys undestand my questions and any help highly appreciate it.
    Thanks in advanced,
    Best regards,
    niroshan

    There isn't any way to distribute an HTML/JS AIR application without the HTML/JavaScript source files. Because JavaScript is a run-time interpreted language, the HTML and JavaScript code has to be available at run time. The obvious downside to this is that the source code of your application is available in plain text on the users' hard drive.
    If your main concern is protecting data stored on the server from malicious users, the username/password strategy is probably a good one (and you wouldn't need to implement in using Flash at all -- you could do the same thing in HTML/JS.). What you need to do is:
    Set up your web server so that the user has to be authenticated with the web server in order to get any data or perform any of the calls (from ajax or anywhere else).
    When your app first starts or at some point, have a login form where the user enters their username/password for your serve. When you make the ajax calls to the server pass the username/password along (or use a session cookie, or some other similar technique for maintaining authentication).
    That way, even if an attacker knows the url of your server calls, they can't actually use them unless they have an account with you.
    From a practical standpoint, you should protect your server by requiring authentication in any case. Otherwise your only security defense is the fact that an attacker doesn't know your exact url. But there are ways to learn urls (for example, by monitoring network traffic) that make it so it isn't too hard for someone to discover the urls even without your app's source code.

  • Adobe AIR 3.0 application loader error

    I am trying to submit an update to my app using the Apple Application Loader.  The prevous version of my app was made with an early version of Adobe AIR about a year ago.
    My problem is when I upload my app I get an error, "The key UIRequiredDeviceCapabilities in the info.plist may not contain values that would prevent this application from running on devices not supported by previous versions".
    I have edited the UIRequiredDeviceCapabilities key in the Infoadditions of the xml document.  I included the camera and microphone capabilities so the app would only run on the iPod Touch 4th gen but this would still allow it to run on older iPhone models.
    Are there any additional changes I need to make to be able to submit this app update?

    Your earlier version may have been done with Flash CS5, which means it would run on armv6 devices, now it only runs on armv7 devices. You only have the choice of publishing it in CS5, or make it be a new app.

Maybe you are looking for