HTML app-storage path iframe targeting question

In my HTML/Javascript app, I'm displaying html content that
lives in my app-storage area in an iframe. I assign the src to the
iframe dynamically in javascript. This works on the mac, but when I
view in Windows, the iframe is empty.
Here is how I create the src path:
var docs =
air.File.applicationStorageDirectory.resolvePath("preview/index.html")
var url = new air.URLRequest(docs.nativePath);
$('previewFrame').src = url.url;
This creates a path similar to the following:
mac: /Users/{username}/Library/Preferences/{appID}/Local
Store/preview/index.html
pc: C:\Documents and Settings\{username}\Application
Data\{appID}\Local Store\preview\index.html
Here is the iframe setup:
<iframe id="previewFrame" src="preview.html" sandboxRoot="
http://localhost"
documentRoot="file:/" allowcrossDomainxhr="true"></iframe>
I tried changing the src path to use .url instead of .native
path, like this
var docs =
air.File.applicationStorageDirectory.resolvePath("preview/index.html")
var url = new air.URLRequest(docs.url);
$('previewFrame').src = url.url;
This creates the following path:
app-storage:/preview/index.html
But if I change my iframe documentRoot to "app-storage:/", or
leave it as "file:/", I see nothing in the iframe, on either mac or
PC.
Can anyone point me to what I'm missing?
Thanks!

Hi gizmogwai
Is there a way I can load the image and use the bridge to
send it to the iframe?
inside the iframe, I have <img src='...'> that needs to
show the image, and the problem is that I can't find a way to point
the src attribute to the image stored on the application storage
directory.
Can you give me an example of what you meant?

Similar Messages

  • Questions from a beg.  CF,HTML,  Renaming folder/path and adding main page.

    Questions from a beg. CF,HTML, Renaming folder/path and
    adding main page.
    Hello I have inherited this new job and I am trying to
    understand it asap. I am a complete beginner to html,CF and web
    development overall
    Yes I grabbed some books, but if you can help me. I really
    appreciate is.
    I have this file structure
    Z:\ToExport\RepDocs\MyReport
    Pointing to it
    http://myserver/Myreport/
    Here you find a MyReport folder
    And find 2 .cfm
    1. Index
    2. version.cfm
    I have 2 BIG questions, ok 3
    HOW DO YOU MAKE A PAGE THAT WILL CONTAIN
    The link of this MyReport.
    A main page. In other words.
    Main page that has a text Main report
    For name of the division_
    Then a link called My reports. And Your report
    Prefereably sorted
    · My reports.
    · Your report
    HOW DO I CHANGE THE FOLDER
    FROM
    Z:\ToExport\RepDocs\MyReport
    Pointing to it
    http://myserver/Myreport/
    TO
    Z:\NewExport\repmining\myreport
    Then point to it
    http://myserver/ repmining\myreport
    WHY IS THE REPDOCS NOT TYPED IN THE BROWSER WHEN VIEWING THE
    MYREPORT.( i dont have to type (repdocs)to view the report?)
    in other words:
    Z:\ToExport\RepDocs\MyReport
    Is typed
    http://myserver/Myreport/
    without repdocs.
    Please excuse me.
    I am a real beginner.
    Thanks .
    Hope someone replies soon.
    Take care.

    OK, I think I understand your questions, so here goes:
    quote:
    HOW DO YOU MAKE A PAGE THAT WILL CONTAIN
    The link of this MyReport.
    Simply have a link on a page, ex:
    <a href ="LINK URL">LINK TEXT</a>,
    As for your question on your reports, I do not understand
    what you are asking
    quote:
    HOW DO I CHANGE THE FOLDER
    FROM
    Z:\ToExport\RepDocs\MyReport
    Pointing to it
    http://myserver/Myreport/
    TO
    Z:\NewExport\repmining\myreport
    Then point to it
    http://myserver/ repmining\myreport
    If you are directly connected to the server, just create a
    folder in (from what it looks like) Z:\ToExport\RepDocs\ that is
    the new folwer name, ex:
    Z:\ToExport\RepDocs\NEW_folder and put files into it. If you
    are now directly connected to the server, use a program like FTP
    server to connect via FTP and do the same.
    quote:
    WHY IS THE REPDOCS NOT TYPED IN THE BROWSER WHEN VIEWING THE
    MYREPORT.( i dont have to type (repdocs)to view the report?)
    in other words:
    Z:\ToExport\RepDocs\MyReport
    Is typed
    http://myserver/Myreport/
    this is simply because
    http://myserver/Myreport/ is
    set to point at the folder Z:\ToExport\RepDocs\MyReport therefore
    it looks like
    http://myserver is set to the folder
    Z:\ToExport\RepDocs\ anything you add into a folder after that will
    be included.
    I hop eI answered some of your questions

  • Embedding a SWF Video in an AIR 2 HTML App

    I've been through the forums for awhile and I can verify that my issue doesn't have to do with transparency or chrome.  I have an IFRAME which is in the application sandbox, giving it access to files in app-storage.  Dynamic images are loading fine, but my dynamically generated <OBJECT> code that is placed in the DOM is not loading the SWF video.  I can see the object placeholder, but no video.
    Are there any requirements to embedding a SWF file, perhaps size requirements (both height and width required)?  Given the fact that my content is dynamic and I don't know the dimensions of the SWF file, I currently have two options for embedding:
    1. Calculate the height and width of the parent element, and assign those values to the OBJECT params.
    2. Use 100% width and height on the OBJECT
    This might pose problems with the proportions of the SWF file, which I'm hoping can be fixed by the scale PARAM (http://kb2.adobe.com/cps/127/tn_12701.html).
    Please help, I haven't been able to find any similar problems.  I followed the documentation for embedding from here:
    http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS4B441C24-BAE3-4110-91FD-A4E5EEFB2467.htm l

    Is this happening for any swf file, or is this an issue related to video?

  • I have a new Ipad and when I try to buy an app it asks for my  questions! I dont remember them so I press the button that send me an email to reset them. Ive sent it various times but it doesnt arrive. please help I need this app for school!!!

    I have a new Ipad and when I try to buy an app it asks for my  questions! I dont remember them so I press the button that send me an email to reset them. Ive sent it various times but it doesnt arrive. please help I need this app for school!!!

    See Kappy's great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities https://discussions.apple.com/docs/DOC-4551
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
     Cheers, Tom

  • Occasionally Connected LightSwitch HTML Apps Using JayData

    JayData, as many are probably aware from prior blog posts and discussions on this forum, is a powerful JavaScript utility library for OData providers, including LightSwitch. 
    Recently, the JayData developers have expanded the
    provider offerings to include many other database programmatic interfaces. 
    Their latest release, JayData 1.3.6, codenamed “Advanced Sync Edition,” aims to support occasionally connected apps by exploiting the local storage capability of the browser (Web SQL. sqLite, IndexedDb, etc.). 
    Development is simplified when using the same data model and API for writing to both local storage and the OData endpoint.
    An example of this is shown at How to Create a Synchronized Online-Offline Data App with JavaScript and JayData. 
    This model, the “To Does” project, was successfully adapted to a LightSwitch HTML app without difficulty. 
    Although “To Does” projects like this serve as a nice proof-of-concept, they are excessively simple compared to real world business applications. 
    Fortunately, JayData 1.3.6 also includes support for configurable foreign keys. 
    With this, more complex object-relational mapping that would typically be used with Entity Framework and similar RDBMS may be approximated.
    To illustrate, the To Does project was expanded to include entity relationships. 
    Specifically, a To Do must be assigned to a single individual Project, and any single Project can have many To Does. 
    A Project can be assigned to an Employee or to multiple Employees, while an Employee can have a single Project or many Projects, thus defining a many-to-many relationship between Employee and Project.
    So how might and online-offline LightSwitch HTML application work in practice? 
    Ideally in my opinion, the transition from online to offline and back should be seamless and transparent to the user, allowing for both UX and UI to be unperturbed. 
    This approach turned out to be too difficult for me as a developer, as I experienced problems with the closed-end nature of LightSwitch’s Visual Collection object, for instance. Separation of concerns is a real challenge with this approach.
     There is also the separate UI approach for both offline and online data entry, which have been nicely illustrated by Michael Washington and Paul van Bladel on their blogs using JayData and BreezeJS with AngularJS alongside a LightSwitch HTML
    app.  This approach is valid, and from the viewpoint of the developer has its advantages. From a design standpoint, it is likely to be frustrating for an end-user who must deal with “spotty” network coverage, necessitating changing back-and-forth
    from one UI to another.
    I opted for a hybrid approach, staying entirely inside the LightSwitch HTML app environment but having individual menu options to select depending on the user’s online status, which is constantly displayed with a status icon (see Main Menu figure). 
    In many cases, the native LightSwitch screen and menu buttons are fully functional in the offline state. 
    When they are not, most often with regard to a “Browse” screen or involving a Visual Collection, I have substituted the updated WinJS library (now at
    version 4.0, capable of replacing LightSwitch’s v1.0 with no breaking changes) to create a custom control that resembles the LightSwitch listview.
    To use the app, you can use any of the online Menu buttons to enter Employee, Project, or To Do data in the usual way while connected.
      The Offline menu buttons are functional in either a connected or disconnected status, which can be tested by disabling your devices WiFi, for example. 
    This LightSwitch app does not work with all browsers, however. 
    Because the local database is stored using the Web SQL/sqLite JayData API, it is not supported by either IE or FireFox. 
    It is supported by Chrome, Safari, Opera, Android browsers, Kindle Fire, and iPad browsers
    (see link). 
    To see the local data stored in Web SQL while using Chrome, you can press F12, select Resources, and expand Web SQL to see the Table data updated with each transaction (see figure).
    After entering data using the Offline menu selections, you will want to synchronize your local data with the remote LightSwitch database, which is performed by clicking “Synchronize Offline to Online” on the Main Menu. 
    A success or error dialog message should follow, depending on the result of the sync. 
    The dates and times of the last synchronizations are displayed on the Main Menu. 
    With each online database transaction, including offline to online syncs, the offline database is updated to reflect the very latest LightSwitch application data. 
    This method attempts to have the LightSwitch online database as the “single source of truth” as much as possible while the user is online.
    Lastly (if anyone is still reading this far), note that by design there is no business logic programmed into this application; business logic is a separate issue to be addressed. 
    There can be as many incomplete To Does as you want, an Employee can be assigned the same Project many times, etc. 
    If your application requires business logic, you will have to program it into the client-side in order for the user to be prompted to follow it while offline.
    To experiment with LightSwitch OfflineToDoes app, go to:
    http://offlinetodoes.azurewebsites.net/htmlclient
    …and log in with username “testuser” and password “Testuser1!” 
    In a few days I will try to load the sample project code to MSDN for anyone to download and review if desired.
    TL;DR:
    JayData provides an attractive solution for creating online-offline LightSwitch HTML apps by automating a single codebase to carry out CRUD operations on both a local datasource and the remote LightSwitch database. 
    Integrating the offline portion of the app into the LightSwitch UI requires an individualized solution and is code-intensive, however.

    Thank you both for the input. Zardoz, I tried making a couple of updates to address items you mentioned.  I left unfixed the problem that occurs when editing an offline Project's budget item..this still does not work.  LightSwitch identifies this
    entity as a decimal, WebSql expects a plain number, but LightSwitch's post-processing business type formats it to currency (I see USD, you may see NZD, AUD, etc.)  In the console there is a "getModel() is undefined" in msls.js.  If I take
    out the Money business type to regular Text on the View, it works fine.
    I'm not sure if I understood your last item just right, but I tweaked the Add Edit Offline Project screen to prevent the Project from being null if the user only enters a new To Do. Not sure why the screen validation wasn't firing before.
    Regarding navigation, I don't wish to use the browser's back or forward buttons at all for the app, especially the Offline portion, only the LightSwitch menu navigation and command buttons. I know Xpert360 has shown how to put the former LightSwitch back
    button in the app which is useful too. Navigation, cacheing and disposing were some of the tricky parts getting to integrate between LightSwitch UI and offline custom controls.  Occasionally I felt like I was having to be "clever" at solutions,
    except that when it comes to programming, I'm not a fan of cleverness.
    The project is published
    here. Hopefully this serves as a good starting point for someone, and I look forward to seeing how it can be improved upon and used in practice.

  • Air app-storage swf network access

    I have an swf file that is saved in the app-storage
    directory, and it’s compiled with “allow network
    access”, and it reads an xml file from a webserver.
    When I load this file into an swfloader in my air app, it
    throws up the “this file is trying to connect”
    notification box.
    Even if I add the path in the security settings, it refuses
    to work.
    Is there any way to let it communicate and read the xml file?

    It should be the application directory, not the storage directory.

  • 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

  • Auto Storage Path Issue

    To all DB2 Gurus,
    database: DB2 v9.5 LUW FP4
    I have attempted to do some reorg/relocate (to overcome the 2TB limit of Windows file-system) my database files and ended up with the situation below:
    >db2pd -d BIP -storagepaths
    Database Storage Paths:
    Number of Storage Paths       8
    Address            PathID     PathState   PathName
    0x000007FFFC83BC80 0          InUse       E:\db2\BIP\sapdata1
    0x000007FFFC83B8C0 1          InUse       E:\db2\BIP\sapdata2
    0x000007FFFC83B380 2          InUse       E:\db2\BIP\sapdata3
    0x000007FFFC83AFC0 3          InUse       H:\db2\BIP\sapdata4
    0x000007FFFC83AC00 4          InUse       F:\db2\BIP\sapdata1
    0x000007FFFC83A840 5          InUse       F:\db2\BIP\sapdata2
    0x000007FFFC83A300 6          InUse       F:\db2\BIP\sapdata3
    0x000007FFFC839DC0 7          InUse       H:\db2\BIP\sapdata4
    If you notice PathID 3 and 7 (noted with * above) points to the same path - H:\db2\BIP\sapdata4.  My main objective is to have an
    AUTO STORAGE PATHS as follows:
    E:\db2\BIP\sapdata1
    F:\db2\BIP\sapdata2
    G:\db2\BIP\sapdata3
    H:\db2\BIP\sapdata4
    I will be able to use relocatedb tool to move containers around.  And will end up with the intended storage paths (shown above).  But the main concern I have is that DB2 will have 2 entries of each storage path pointing to the same path (see below).
    >db2pd -d BIP -storagepaths
    Database Storage Paths:
    Number of Storage Paths       8
    Address            PathID     PathState   PathName
    0x000007FFFC83BC80 0          InUse       E:\db2\BIP\sapdata1
    0x000007FFFC83B8C0 1          InUse       F:\db2\BIP\sapdata2
    0x000007FFFC83B380 2          InUse       G:\db2\BIP\sapdata3
    0x000007FFFC83AFC0 3          InUse       H:\db2\BIP\sapdata4
    0x000007FFFC83AC00 4          InUse       E:\db2\BIP\sapdata1
    0x000007FFFC83A840 5          InUse       F:\db2\BIP\sapdata2
    0x000007FFFC83A300 6          InUse       G:\db2\BIP\sapdata3
    0x000007FFFC839DC0 7          InUse       H:\db2\BIP\sapdata4
    Questions:
    - is it ok to leave them as is?
    - if I leave it as is would it have any effect on the database when it eventually auto extend a tablespace?
    - do I need to remove the dupplicate?  if yes, how?
    - if I drop/delete storage duplicate storage path will it delete both entries?
    Please advise.  Thank in advance for your help. 
    Happy Holidays!!!
    Francis

    Stephen,
    Thank you for the prompt reply.  This what happens when I created a new empty tablespace:
    E:\db2\BIP\sapdata1\DB2BIP\NODE0000\BIP\T0000040\C0000000.LRG
    F:\db2\BIP\sapdata2\DB2BIP\NODE0000\BIP\T0000040\C0000001.LRG
    G:\db2\BIP\sapdata3\DB2BIP\NODE0000\BIP\T0000040\C0000002.LRG
    E:\db2\BIP\sapdata1\DB2BIP\NODE0000\BIP\T0000040\C0000003.LRG
    F:\db2\BIP\sapdata2\DB2BIP\NODE0000\BIP\T0000040\C0000004.LRG
    G:\db2\BIP\sapdata3\DB2BIP\NODE0000\BIP\T0000040\C0000005.LRG
    H:\db2\BIP\sapdata4\DB2BIP\NODE0000\BIP\T0000040\C0000006.LRG
    H:\db2\BIP\sapdata4\DB2BIP\NODE0000\BIP\T0000040\C0000007.LRG
    It created 2 containers on the same storage path since it has two entries.
    In v9.7 when i execute " alter database drop storage on <path1>" will it delete only one entry
    in the storage path lists?  I have not done this so do not know the outcome.
    Thanks again.
    Francis

  • App storage report

    Hello So this is my first macbook Pro and i noticed that at the app storage in system report said it was 50gb of used space, why so much? I dont even have that much apps except for the goprostudio and beats upgrader. Plz help I know this might be a dumb question but im just learning:)

    While it is certainly possible to have this quantity of Applications, it *is* a pretty hefty size.  In the Applications folder, list view, there is a "Size" column which you can use to see which apps are using what space.  You can also use "Get info" (command-i) to check the sizes of things.
    charlie

  • Estimating size of Settings Storage Path

    Hi,
    Can anyone advise what kind of size i should allow for the SettingsPackages folder? (Settings Storage Path location)  I'm going to allow UE-V create this on the User's Home folder but as we enforce quota's I'm curious to know what we should allow for
    this to cater for now and in the future?
    Thanks
    Jim

    That's a good question.  I just ran some PowerShell to get the average size of our users SettingsStoragePath and see that our average size is 34MB.  Take that as you will.  And that is with orphaned files.  See below.
    We have 64 templates loaded for our users, most of these are the out of the box Microsoft templates. 
    Take a look at this thread for something to look out for.  Ue-V will orphan some files that can be periodically cleaned up. 
    https://social.technet.microsoft.com/Forums/en-US/51a7bf78-a3ca-4cea-bfeb-34483127b427/how-to-get-rid-of-old-files-from-themesettings-folder-which-occupied-huge-space-100?forum=mdopuev#51a7bf78-a3ca-4cea-bfeb-34483127b427

  • Possible bug in Photoshop CS6 with app.activeDocument.path.

    JavaScript running in Photoshop CS6 under OS X 10.7.5 returns the wrong result for app.activeDocument.path when the file is located on the boot drive. The result is undefined and an error message incorrectly states that the document has not been saved yet. If the file is located on a remote volume, the correct path is returned.
    To reproduce this problem, create a new file in Photoshop CS6 on a Mac. Save the file to the desktop. With the file still open, run the following script in ExtendScript Toolkit.
    // start script
    var thePath = app.activeDocument.path;
    alert(thePath);
    // end script
    Running the same script with a file located on a server volume open in Photoshop correctly returns "/path/to/file.psd" instead of undefined and no error occurs.
    This appears to be a bug in Photoshop CS6's JavaScript implementation. This problem did not exist in Photoshop CS3.
    A similar issue prevents Photoshop CS6 from saving files to the boot drive using activeDocument.saveAs.
    Has anyone else experienced this problem? If so, have you discovered an alternate method to determine the file path or save a file on the boot drive?

    Don't know if this will help much but at least you can use it to check a document's filepath without throwing an error. And maybe tell if the problem is with the Photoshop DOM.
    function hasFilePath(){// returns true/false
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        return executeActionGet(ref).hasKey(stringIDToTypeID('fileReference'));
    function getFilePath(){// returns path as a string if exists, undefined if not
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var desc = executeActionGet(ref);
        if(desc.hasKey(stringIDToTypeID('fileReference'))) return decodeURI(desc.getPath(stringIDToTypeID('fileReference')));

  • I have some problem when I want to download app in iTunes some security question ask me about my visa when I right my visa number I got an errors and on top of the page told me go to iTunes support I do these things and now what should I do

    I have some problem when I want to download app in iTunes some security question ask me about my visa when I right my visa number I got an errors and on top of the page told me go to iTunes support I do these things and now what should I do

    Most of the people on these forums, including myself, are fellow users - you're not talking to iTunes Support here.
    You can contact iTunes Support via this link : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Embed  html file without using IFrame UI

    Is there any way to embed html file without using IFrame UI?

    Hi
    To embed a static HTML content inside your view, Iframe is the easiest form or else, you can provide links through Linktourl UI or through a static text or a button, invoke a action and display the HTML content inside the frame or call it in a seperate (external) window.
    Otherwise, we have only less options!
    if you have anything specific, do let us know
    thanks
    sathya

  • Invalid Path for target file, check if connector is deployed correctly

    Hi all,
    I've got a tricky problem over here: we are using OMB scripts for generating simple extract mappings that just copy data from an oracle source table to a flat file on a directory. Up untill now ( with version 11.1 ) this did not pose any troubles, but now we are using 11.2 for the first time and we don't get the mappings to execute. Generating, validating and deploying all works fine, only executing fails with the error: "Invalid Path for target file, check if connector is deployed correctly". It ends to rapidly, so I'm assuming the problem lies in the repository and not on the database itself.
    I'm pretty sure all locations are defined as needed, flat file operator in the mapping has correct location, the flat file module has the same location,...
    I tried almost everything: recreate oracle module, recreate flat file module, unregister and recreate db location, unregister and recreate dir location, recreate mapping and flat file, export/import...
    The strange thing is, I was able to execute a mapping once. Although it ended with an error (due to a function in the mapping), it created the file correctly. After that I needed to update the directory path of the target location and from then on, I always got the error above, and I don't see a good reason.
    Any suggestions??
    Tnx,
    Michel

    That error is displayed when the generated code fails to execute with one of the following database errors;
    UTL_FILE.INVALID_PATH
    UTL_FILE.INVALID_OPERATION
    UTL_FILE.INVALID_FILEHANDLE
    So its worth checking the generated code for that map and searching for the code around UTL_FILE.FOPEN and seeing what the path and the file name in the code are. Maybe the file is created with permissions such that it can be created but not then re-written and its an OS permissions thing (such as UMASK settings).
    Cheers
    David

  • I can't remember my password to my itunes or app account or the security questions,

    I can't remember my password to my itunes or app account or the security questions,

    Click here and request assistance.
    (88880)

Maybe you are looking for