Javascript history.back() doesnt fire in AIR html app

I'm working on air app (html/ajax/javascript). I need to make a navigation feature, like a browser back and forward button in a page with iframe, all pages are on same domain.
I have the following scenario:
Adobe AIR (version 2.7.1) app that loads (air.HTMLLoader) index.php from mydomain.com
index.php file has following design:
<html>
    <body>
        <input type="button" value="< BACK" onclick="iframeID.history.back();">
        <input type="button" value="FORWARD >" onclick="iframeID.history.forward();">
        <ul>
            <li><a href="/page1.php" target="iframeNAME">page 1</a></li>
            <li><a href="/page2.php" target="iframeNAME">page 2</a></li>
        </ul>
        <iframe src="page_default.php" id="iframeID" name="iframeNAME"></iframe>
    </body>
</html>
So, this code works in FireFox, Chrome, Safari, but not in Adobe AIR app
I can't find any documentation about this issue, really cant understand where is the problem, as i know adobe air uses webkit for web pages browsing like chrome and safari but only in air app this code doesnt work.
I hope someone can help me.
Thanks!

http://forums.adobe.com/community/robohelp/airhelp
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge

Similar Messages

  • NativeWindow reload in AIR/HTML apps?

    In an AIR/HTML app, is it possible to make a NativeWindow
    reload itself? I don't see anything in the API docs for
    NativeWindow that would allow this.
    I am opening new NativeWindows via a JS function, but if a
    particular window is already open, i call orderToFront() to get the
    window in focus instead of creating a new NativeWindow, but I would
    like to have the window contents refreshed because I am passing
    different parameters in the query string. Any way to do a simple
    HTML/JS-style window.reload() equivalent for NativeWindow?
    thanks,
    -norm

    Hi,
    Since this is an HTML AIR app, you probably only need to
    refresh HTMLLoader.
    For eg: nativeWindowObj.stage.htmlLoader.reload().

  • Using Facebook SDK in Air HTML environment

    Hi,
    I am building an AIR application using HTML/JS and I'm trying to work with Facebook Javascript SDK for some simple functionality.
    It seem however when running and an AIR environment I am not able to access the FB object.
    I have the SDK locally so I know its there but simple FB.init() and FB.login() are non-existent and without errors...
    I also tried using the FB AS3 library by incldeding it in <script> tags but this gives me an error
    TypeError new window.runtime.com.facebook.graph.Facebook() is not a constructor
    Don't know if its because my xml namespace is version 2.0 and not 1.5 (1.5 errors as well but it says some IFilePromise class is not found.
    Can the Javascript SDK be used in building Adobe AIR HTML apps?

    Annoyingly the SDK hasn't been updated in over three years. I've had a casual look via Visual Studio's object inspector to see if I can spot any new methods or properties that could be useful but if they are there then they are hidden well. Media Kind, for example, was introduced in iTunes 9, I think, but can't be read from code.
    I don't know what tasks you're hoping to automate, but you might find some of my scripts useful either in their own right or as food for thought.
    tt2

  • Flash buttons and History.back

    Hi all
    I am using a flash button created in DW studio 8.
    But want to use the javascript:history.back() for the link.
    I put in the link textfield javascript:history.back()
    But that don't work how can i fix that please?
    Thanks for all that can help me
    Hugo

    I wouldn't recommend the use of Flash buttons period.
    They cannot be spidered.
    They do not appear when the visitor doesn't have Flash
    plugin.
    They are not usable by screen assistive devices.
    They have link and path problems after they have been
    inserted on your page.
    Your best bet is to forget they exist and use an ordinary
    text or graphic
    link.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "wwcbe" <[email protected]> wrote in message
    news:ef2uo7$732$[email protected]..
    > Hi all
    > I am using a flash button created in DW studio 8.
    > But want to use the javascript:history.back() for the
    link.
    > I put in the link textfield javascript:history.back()
    > But that don't work how can i fix that please?
    >
    > Thanks for all that can help me
    >
    > Hugo
    >

  • Html App: air.trace() not outputting to console... are Adobe still supporting html apps in AIR?

    Hi
    Just getting up and running
    Mac OS X 10.9. Adoe AIR 3.9. All working fine except air.trace() not outputting anything to the console.
    Bit of googling meant I created a mm.config in ~ with the line:
    ErrorReportingEnable=1
    but still no joy.
    Any other tips for getting this to work or is it just now broken and/or unsupported?
    Are HTML apps wrapped in AIR now legacy technology?

    I have the same question... I've been trying to get an Adobe AIR HTML app going, but there appears to be no IDE that supports debugging an HTML/JS AIR App, and fdb, which is supposed to be able to debug HTML/JS AIR apps, does not.
    Is HTML/JS still a supported way of developing Adobe AIR apps?  If so, then why aren't issues like this getting some attention?
      -Josh

  • Bug in navigateToURL? (AIR HTML/JavaScript) window name parameter not working

    Hi,
    I have to popup the default browser from a HTML/JavaScript application.
    All links on the Air page should be opened in the same tab in the same browser window that was opened by the first click on a link.
    The code I use is
    var urlString = "http://www.adobe.com";
    var request = new air.URLRequest(urlString);
    air.navigateToURL(request, "myNewWindow");
    The myNewWindow parameter does not seem to be taken into account:  a new tab is opened on every click.
    I created a new Air application in Aptana and added the following straightforward code to it:
    <html>
        <head>
            <title>navigateToURLTest</title>
            <script type="text/javascript" src="lib/air/AIRAliases.js"></script>       
        </head>
        <body>   
    <a href="http://www.google.com"
                onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'AirTestWindow');return false;">New Tab</a>
            <br />
            <a href="http://www.adobe.com"
                onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'AirTestWindow');return false;">Same Tab</a>
        </body>
    </html>
    Same problem.
    Does anyone have any idea?
    Thanks

    Is there really nobody who can answer or at least try to reproduce this? 
    It's just creating a new Air HTML/Javascript application with one link with a named window target!

  • Consuming SOAP services from AIR/HTML (JavaScript).

    Hi All.
    I am trying to consume SOAP web services from an AIR/HTML application for a research on AIR I am doing for my company, and I am having very little success.
    I am creating JavaScript clients using apache's cxf wsdl2js utility.
    When I try to use the client to call any web service I've tried, I always get an 'error 500' response.
    The web services work fine if i call them from other clients.
    Before trying cxf generated clients I googled a lot to see if there was a more native way of doing these calls from AIR, but found nothing. I don't see anything in documentation or the web about it.
    Am I the only one trying this?
    Could this be a cross-domain issue? I'm certainly hoping AIR apps don't have this issue.
    Any pointers as to how to succesfully consume SOAP services from AIR is greatly appreciated.
    Thanks!

    In Visual Basic, you can set Network Credentials like this (assuming that you first declare Public CallWebService001 As New <WebReference>):
            ' Create a new instance of CredentialCache.
            Dim mycredentialCache As Net.CredentialCache = New Net.CredentialCache()
            ' Create a new instance of NetworkCredential using the client
            ' credentials.
            Dim credentials As Net.NetworkCredential = New Net.NetworkCredential(<username>, <password>)
            ' Add the NetworkCredential to the CredentialCache.
            mycredentialCache.Add(New Uri(CallWebService001.Url), "Basic", credentials)
            ' Add the CredentialCache to the proxy class credentials.
            CallWebService001.Credentials = mycredentialCache

  • Adobe Air - HTML, Javascript and Threading

    Hello,
    I am developing an application using Adobe Air - HTML and
    Javascript. What I am trying to do is to implement threading in
    Javascript. I am using implementing threading in Javascript as per
    this Neil blog.
    Click
    Here. It clearly says that this threading works only in Firefox
    2.0 and I am trying to use this in with my Adobe Air, but when I
    try to refer a function , it gives me error saying "unable to find
    it".
    I was wondering if this is the best way to go for threading
    in Adobe Air HTML application or there is some other way also.
    Thanks,
    Jaikishan

    Hi jjalan,
    The yield and generator functionality is only available in
    Firefox's javascript execution engine. When you are executing
    javascript in AIR, it is done by the webkit and squirrelfish. Take
    a look at
    http://webkit.org/blog/189/announcing-squirrelfish/
    If you can find a javascript library that works on safari /
    webkit, chances are high that it may work in AIR.
    Also, you can always do pseudo-threading via the age old
    setTimeout()

  • AIR HTML+JavaScript app vs. hardware accelerated composing

    I'm developing an HTML application for mobiles and desktops. The application is optimized for WebKit based environment. To improve a rendering speed I'm using hardware accelerated layers (something like -webkit-transform: translateZ(0); etc...).
    This works great on my iOS devices (using PhoneGap aka Cordova to package a "native" app).
    On Windows and OS X I'm using Adobe AIR 3.5 to package a captive runtime HTML/JavaScript based application. I have found this to be the best solution (for now) even though I have tried many others (Cordova for Windows 7 / OS X, TideSDK, ...).
    The point is that the HTML rendering in Adobe AIR seems not to be hardware accelerated. Does anyone of you have experience with this? Is here any possibility to enable hardware accelerated layers in AIR HTML rendering?
    Thanks a lot

    Thanks a lot, actually I tried AIR SDK 3.6 yesterday and it seems it still doesn't support an acceleration. In a browser it works just fine even in fullscreen (zoomed page). It seems that the best way to achieve my goal will be using Cordova wrappers for OS X and Win Desktop. But as an AIR developer I really want to use AIR SDK So I will do some more tests..
    Thanks,
    Pavel

  • History back on non-english keyboards

    It appears that all non-english keyboards (meaning keyboards that does not have the [ and ] characters as a "singlepress-key"), can't use the history back and forward feature anymore. You need to use the mouse right-click feature or use the buttons in the menu. I'm using a Wacom Tablet and have my buttons are configured to history back and forward when Safari is an active window. I've tried to switch to US keyboard and make the shortcut in the Wacom software, but after I go back to my native language - Danish - it doesnt work. After Apple changed the option from backspace to command + [ and ], I cannot use the history anymore unless I have to use the mouse.
    Can anyone help?

    Hi Jim,
    That shouldn't be a problem at all, if you buy it in the US, the software will be in English, but should install just fine on her PC.
    I'm sure someone will give their input, some people here have bought players from other regions.
    Cat

  • I click on a button to bring up a PDF form to print, button doesn't work and I get "javascript history.go(0).

    I just this week started to use Firefox 4.0 Beta 12. Our golf organization has a website that has tournament entry forms in the PDF format. You click on a button and get the form ready to print.
    When I click on the button, I don't get the form and the following message shows up-"Javascript history.go(0)

    Hi Idreier,
    I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit.
    Hopefully this helps!

  • Javascript:history.go(-1)

    This is driving me absolutely insane. I am using this code
    within flash to go to previous page from browsers history. It works
    fine on my mac, but testing in Windows IE7 it only works once.
    http://www.bloxdesigns.com/jewelry/necklaces/page1/metal/page1/item2/index.html
    (then I click on picture link on bottom and on next page hit "back"
    it works and then I hit "back" again and it just seems to try to
    reload the current page even though my browser's back button
    works.)
    Just for fun I took the code out of flash and placed directly
    on the page ... then it worked. I still might have to do this
    (which will mean I will have to redesign the site.) I have also
    tried history.back(), placing the AS directly on the button,
    putting it on both the onRelease and onPress handlers and calling
    it as a function that I place in my HTML. I have been stuck for
    days ... any help is so appreciated!!!!!! My FLA is at
    http://www.bloxdesigns.com/flash/item01.fla

    Hello, Ryan.
    Sorry for the delayed response. Thanks for your reply -- it led to a solution.
    Basically, the button code worked for me:
    input type=button value="Back" onClick="history.go(-1)"
    But the link code didn't work:
    a href="#" onClick="history.go(-1)">Back
    I wanted my own custom button, so after trying both lines you provided and seeing that the form <input type=button ... > worked, I modified it slightly to this:
    input type="image" src="back.gif" onClick="history.go(-1)"
    Which worked like a charm. Still not sure why I couldn't get the link code to work....
    Thanks again.
    -Scott

  • Global error handlers in AIR/HTML

    Dear Adobe,
    there is good article on flobal error handling in Flex and AIR 2.0: http://www.adobe.com/devnet/flex/articles/global-exception-handling.html
    Is there a global javascript exception handling mechanism in AIR/HTML? window.onerror does not work (that seems to be Webkit bug fixed in latest Chrome, but not yet in the AIR environment).

    Dear Adobe,
    any thoughts?)

  • When I code script window.history.back(); /script on a page due to a data validation problem, all browsers except Firefox redisplay the filled-out form page.

    When I use javascript "window.history.back()" because a user enter invalid text, Firefox returns to the page with the form on it but it clears out the form. All the other browsers go back to the previous page with the form filled out as it was when submit was entered.
    Firefox did not used to do this. I do not change browser settings from default to get this unfortunate behavior. This may mean Firefox is more secure, but only on a public computer. On a private computer, this sucks.

    See if this helps you.
    https://developer.mozilla.org/en-US/docs/Web/API/Window.history
    If not, try posting at the Web Development / Standards Evangelism forum at mozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
    http://forums.mozillazine.org/viewforum.php?f=25
    You'll need to register and login to be able to post in that forum.

  • Microphone record, playback in AIR html js desktop app

    hi,
    I want to record, save and playback the microphone audio in an HTML/JS AIR desktop app.
    I can't find any examples so my code is based on AS3.
    But the app crashes almost right away when the SampleDataEvent handler function is called.
    Should it be in a while loop sames as AS3?
    $(function(){
        var mic;
        var soundBytes = new air.ByteArray();
        $("#btnRecord").click(function(){
            mic = air.Microphone.getMicrophone();
            mic.rate = 44;
            mic.addEventListener(air.SampleDataEvent.SAMPLE_DATA, sampleEvent);
        function sampleEvent(e){
            while (e.data.bytesAvailable) {
                var sample = e.data.readFloat();
                soundBytes.writeFloat(sample);
        $("#btnStop").click(function(){
            mic.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, sampleEvent);
            $("#txtActivity").val("");
        $("#btnPlay").click(function(){;
            for (var i = 0; i < 8192 && soundBytes.bytesAvailable > 0; i++) {
                var sample = soundBytes.readFloat();
                e.data.writeFloat(sample);
                e.data.writeFloat(sample);
                //we write the data twice because there are 2 channels (stereo)
    thanks,
    Jeff.

    this works on my macbook. But on my Windows 8.1 machine the audio gets played back twice as slow as normal.
    Not a lower pitch, just twice as slow. Any idea why this is?
    $(function(){
        var s;
        var sc;
        var nowRecording = false;
        var nowPlaying = false;
        var recordedBytes = new air.ByteArray();
    //   air.SoundMixer.audioPlaybackMode = window.runtime.flash.media.AudioPlaybackMode.VOICE
        var mic = air.Microphone.getMicrophone();
        mic.rate = 44;
        mic.gain = 70;
        mic.setSilenceLevel(0);
        $("#btnRecord").click(function(){
            if (!nowRecording) {
                air.trace("recording");
                recordedBytes.clear();
                mic.addEventListener(air.SampleDataEvent.SAMPLE_DATA, getMicAudio);
                nowRecording = true;
                $(this).val("Click me to stop")
            else {
                air.trace("recording stopped");
                mic.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, getMicAudio);
                nowRecording = false;
                $(this).val("Click me to record")
        function getMicAudio(e){
            recordedBytes.writeBytes(e.data);
        $("#btnPlay").click(function(){
            if (!nowPlaying) {
                air.trace("playing");
                recordedBytes.position = 0;
      s = new air.Sound();
                s.addEventListener(air.SampleDataEvent.SAMPLE_DATA, playAudio);
      sc = new air.SoundChannel
                s.play();
               sc.addEventListener(air.Event.SOUND_COMPLETE, stopPlayback, false, 0, true);
                nowPlaying = true;
              //  $(this).val("Click me to stop playing")
            else {
                sc.stop();
                stopPlayback();
        function stopPlayback(e){
            air.trace("playing stopped");
            s.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, playAudio);
            nowPlaying = false;
        function playAudio(e){
      if(!recordedBytes.bytesAvailable > 0)
      return;
            for (var i = 0; i < 8192; i++) {
                var sample = 0;
      if(recordedBytes.bytesAvailable > 0) sample = recordedBytes.readFloat()
                e.data.writeFloat(sample);
                e.data.writeFloat(sample);

Maybe you are looking for

  • Hardware accelerated scaling on external display not smooth since 11.0

    Hi, When running 1280x800 app in fullscreen mode with hardware accelerated scaling (fullScreenSourceRect) from a laptop on the second screen (extented desktop etc)  hardware scaling seems to fail to smooth the image on certain cases. flash version sc

  • Fix with remove problem

    Using the Essbase version 6.2 I have tried without luck to do a fix combined with remove.My problem is that I want to remove 2 nodes. If have tried the following.FIX (@remove(@idescendants(D_ABM_MEASURE),"TOTAL COST"));CALC DIM (D_ABM_GL_ACC_DIM, D_A

  • Fonts are overlapping in PDF through Autovue

    Hi,    I am generating PDF using *.dwg file through autovue 20.2.2 version. I am adding markups through program or webUI after that I am generating PDF using autovue API. After generating PDF fonts are overlapping in PDF.    Could you please let me k

  • Multi byte character set

    Hi, I am going to create a oracle 8i database in linux OS.In that i want to set english, italian and chinese language. My question is 1. what are the parameter to be set in the OS level for this multi byte characterset 2.how to set these characterset

  • Photoshop Elements 12 transfer from windows to a mac

    Can I transfer my photoshop elements 12 from my windows laptop to a macair?