Simple AIR ajax question? One html file or many?

I am a new ajax air developer and was wondering if it's a better practice to use one html file in my app or many html files? So far I have been testing with many html files using javascript location.href to send the user to another html page when they click different navigation buttons. This works although there is a clear webpage "loading" feel to the app due to a temporary white screen displaying over the app as it loads the next page (maybe for a couple milliseconds). Not a huge deal but still feels somewhat unprofessional since regular desktop apps do not have this "flicker" occur when changing navigation. Now if I use a single html file (where I load html using javascript) this does not occur but the file feels very large and bloated. Anyone have any suggestions of how I can eliminate the flicker that occurs using many files (perhaps I am not loading the file the correct way into the native window) or am I stuck with a single file if I want there to be no flicker?

I'll say become a Flex/AIR developer

Similar Messages

  • Question about HTML files using TextEdit

    First off, I wanted to ask if this is the proper place to post a question about HTML/XHTML. I couldn't really find anywhere else that seemed to fit better, but please point me in the right direction if this is not the place. Thanks.
    Moving on -- here's my question:
    I'm having trouble with working with HTML files in TextEdit. I'm on a Mac, using TextEdit as my HTML editor (I can not afford one of these other HTML editors, and I like using a simple text editor like TextEdit for HTML). Here's my problem: I open a new rich text document in TextEdit and write my HTML and then choose File>Save As and choose "HTML" under the File Format drop-down box. Having saved this file as an HTML file, I then open Safari and choose File>Open File and select my HTML file; however, when I do this, my web page's text does not appear in the browser window. Instead, the HTML code itself appears in the browser window, as if the browser was not interpreting it as HTML and converting it. The same problem happens when saving the file as a .htm file using Microsoft Word for Mac.
    So, as another solution (at the suggestion of a helpful poster in a previous thread), I tried creating a plain text file in TextEdit (instead of a rich text file like before). Now, in TextEdit there is no option for saving plain text files as HTML files, so I simply save it as a Unicode-8 format and then find the file in Finder and change the extension to .htm myself (I've tried .html as well). This, fortunately enough, actually works! When I open the file in Safari I get to see my web page as expected. However, the first time I quit out of the application TextEdit and then try to reopen my .htm file in TextEdit, I no longer can see my HTML code. Instead, TextEdit shows me the actual web page text that I would expect to see when I open the file in a browser, and my HMTL code is lost.
    Can someone please help me here? There has to be a way to edit HTML in TextEdit without the code disappearing every time you quit out of the application and reopen the HTML file. Any help is greatly, greatly appreciated. Thank you.

    That's the problem -- once I convert it to plain text there is no longer an HTML option under the Save As drop down menu. The drop down menu's title is Plain Text Encoding instead of File Format and the only options I get are Unicode-8, Unicode-16, Western, Chinese, and so forth. I can save it as an HTML file, but only if the file is rich text, which doesn't work for HTML.
    So, I can save it as plain text (.txt) and then go and change the extension myself, and like I said, it works if I do that. I can edit HTML in TextEdit and open the file properly in Safari to view my web page. The problem is (I went over all this in my first post) that, after that, if I exit TextEdit and reopen it, my document is no longer HTML code -- it is now simply the text of the web site as if I had opened it in a broswer.
    What do you suggest I do?

  • 2 easy questions - one on file size, teh other on sound reduction

    Hi, hope you can help:
    1. If I make a 30 second movie clip in imovies that I would like to put on myspace it is 600MB and the limit is 100MB. How do I reduce the file size or what other options do I have?
    2. When I overlay music from itunes onto a movie clip, is it possible to take the sound off the movie clip, or quieten the sound during the music?
    Thanks for your help

    1) in the share dialog, you see some presets, mail, web, cd.rom.. choose one of these and your file size will shrink dramatically...
    I personal prefer a "manual" setting, choose Quicktime, hit the button, and you get confronted with a second window, with zillions of options...
    2) sure, spend some time reading..:
    http://manuals.info.apple.com/en/iMovieLesson6.pdf

  • Simple wireless connection question-one laptop hookup

    Can one get a "wireless modem" from a cable company and buy a laptop (mac)and connect wirelessly to this modem, without having to plug the modem directly into the laptop? I've heard of "networking" where the cable modem plugs directly into a desktop, then a laptop can find connection wirelessly, but what if there's ONE computer and you don't want it wired to modem, but want to move around the house. Sorry for dumb question, but I can't seem to think thru this! Thanks ahead for help!

    What you mean is a wireless router. Very different from a wireless modem of which there are several (e.g. ethernet, USB and CardBus). Yes, you set up a wireless network via that modem/router. However, you situation is totally dependent on what your ISP provides/recommends. Check with your ISP. If they provide you with just a modem, you would pick up something like the AirPort Express to create a wireless network for your notebook to access wirelessly.

  • Two quick AIR(AJAX) questions.

    I've been working on developing an AIR interface for a web
    app that I've also been developing. It is necessary for my AIR app
    to minimize to the system tray (on Windows) so it's out of the way.
    I already have that functionality in place, however, I am
    having trouble finding a solution to capture the windows chrome
    minimize event, suppress it, and run my own minimize function.
    I am also wanting a single (or double, doesn't matter) click
    on the tray icon to restore the window. Again, I have the
    functionality in place, but am having trouble capturing the click
    event on the tray icon.
    I'm sure I'm just missing something about how AIR uses
    events, so if y'all would be so kind as to point me in the correct
    direction, I would appreciate it! Thanks!
    -Beau

    For the window minimize event:
    window.nativeWindow.addEventListener(air.NativeWindow.MINIMIZING,
    yourMinimizeFunction);
    function yourMinimizeFunction(event){
    event.preventDefault();
    For the Icon click:
    if(air.NativeApplication.supportsSystemTrayIcon){
    air.NativeApplication.nativeApplication.icon.addEventListener("click",
    clickHandler);
    } else if(air.NativeApplication.supportsDockIcon){
    air.NativeApplication.nativeApplication.addEventListener("invoke",
    clickHandler);
    Note that the events aren't symmetrical between Windows and
    Mac. Windows gives you mouse events, the Mac gives you an invoke
    event. Also, this code has not been checked, there may be typos,
    etc.

  • Java.util.logging: write to one log file from many application (classes)

    I have a menuapp to launch many applications, all running in same JVM and i want to add logging information to them, using java.util.logging.
    Intention is to redirect the logginginfo to a specific file within the menuapp. Then i want all logging from all applications written in same file. Finally, if needed (but i don't think it is), i will include code to write logging to specific file per app (class). The latter is probably not neccessary because there are tools to analyse the logging-files and allow to select filters on specific classes only.
    The applications are in their own packages/jars and contain following logging-code:
            // Redirect error output
            try {
                myHandler = new FileHandler("myLogging.xml",1000000,2);
            } catch (IOException e) {
              System.out.println("Could not create file. Using the console handler");
            myLogger.addHandler(myHandler);
            myLogger.info("Our first logging message");
            myLogger.severe("Something terrible happened");
            ...When i launch the menuapplication, it writes info to "myLogging.xml.0"
    but when i launch an application, the app writes info to "myLogging.xml.0.1"
    I already tried to leave out the creation of a new Filehandler (try/catch block in code above) but it doesn't help.
    Is it possible to write loginfo to same specific file?

    You should open/close it somehow at every write from different processes.
    But I personally prefer different file names to your forced merging, though.

  • Parsing HTML files

    Hello,
    I have a question about parsing HTML files. Usually when I get an HTML file and I need to find all the text in it I do this. This stuff just collects all of the hyperlinks and ignores all the html tags just keeping the actual text. It's fine for smaller files but occasionally I'll hit a large online text file and it will work but its way to slow for large files. I don't need to do all of this HTML tag stripping however for text files. Is there a way to still grab all the text without doing any tag searching to make it faster?
    thanks,
    private void find() throws IOException
            //Really slow for large text files.  Need a way to just use a regular scanner on an internet text file
            new ParserDelegator().parse(new InputStreamReader(myBase.openStream()),
                    new ParserListener(),
                    true); 
         * Inner class for processing all "<a href.."> tags when reading a base URL.
        private class ParserListener extends HTMLEditorKit.ParserCallback
            final String IGNORED_LINKS = "^(http|mailto|\\W).*";
            public void handleStartTag (HTML.Tag t, MutableAttributeSet a, int pos)
                if (t == HTML.Tag.A)
                    String href = (String)(a.getAttribute(HTML.Attribute.HREF));
                    //System.out.println(href);
                    //System.out.println(href.matches(IGNORED_LINKS) + "\t" + href);
                    if (! (href == null || href.matches(IGNORED_LINKS)) && !myURLs.contains(href))
                        myURLs.add(href);
                //TODO fix
                if (t == HTML.Tag.TITLE)
                    String title = (String) (a.getAttribute(HTML.Attribute.TITLE));
                    if (!(title == null))
                        myTitle = title;
                    else myTitle = "No title was found";
            public void handleText (char[] data, int pos)
                myText.append(" ");
                myText.append(data);
        }

    JFactor2004 wrote:
    My question is. If I know an html file is actually just a txt fileThis isn't a question. HTML files are text by definition.
    is it possible to look through it (maybe use something similar to a regular scanner) without doing anything with html.That depends on what you mean by "doing something with HTML". You can certainly read it one line at a time.

  • Load html files onto repository by bulk loader

    hi
    my subject is self explainatory .
    i want to load html files . i created one html file (for example test.html),then create test.html.md.properties and
    write these in it :
    nodeType = Ad
    but when i run bulk loader script say to me :
    java.rmi.remoteException : null is not defined.it must be in order to create node :/<parent>/test.html
    please help me

    Hi;
    I've created a webservice proxy (Stub) on JDeveloper 9.0.3 pre, this class it's a proxy for a webservice, and it's works fine on JDeveloper, but I need to upload this class to a Oracle 8i 8.1.7.3 Database, the database must be the client for this webservice, but when I try to create a java source on the database it gives me some compilation errors, because it can't find some classes (XERCES, SOAP, and JAXP) that are needed by the webservice proxy (Stub); so my question is how to load this classes to the DB? I've found a document on OTN that says (http://otn.oracle.com/tech/java/jsp/content.html -> Unleash the Power of Java Stored Procedures):
    "Database as Active Web Service Client
    A Java stored procedure can be a Web service requester. Attaching such a stored
    procedure as a trigger allows the database to automatically invoke external Web
    services upon data-driven events. Non-Java modules such as PL/SQL procedures
    and DBMS packages can be encapsulated with a Java wrapper that will invoke
    external Web services, on their behalf. Here are the steps for a proof of concept:
    ' Load XERCES, SOAP, and JAXP jar files.
    ' Grant connect and resolve to the SOAP server/port.
    ' Load the SOAP client Java class.
    ' Create a PL/SQL package to wrap the SOAP client as
    trigger.
    The complete code sample and instructions will be posted on the Oracle OTN
    Web site."
    It's dated on June 2002, could some one give me a hint on how to do it?
    Thanks
    Mario A ChavezSorry, due to lack of bandwidth, it took us longer than we thought for providing this. As i have just responded in OracleJVM forum, we will be posting the complete demo/code_sample, using Apache SOAP clients libs, in a couple of weeks. Demo is working we are documenting it.
    drop me an email ([email protected]) if you can't wait.
    Kuassi

  • I want to upload one and only that one specific file

    Hi everybody,
    this may sound like a silly question, but I got a problem which is driving me mad I can't figure out a way to solve it.
    So here it comes.. :-)
    Every time I upload files within my DW file manager it not only uploads that specific file but also all the others files. For example I change one html file, upload it and when its done it also loads all the embeded mp3s and videos and css and all that crap which takes hours.
    I'm sure there is a way to tell DW to only upload the file I want to upload, but I can't find it in the setup.
    By the way, I'm using DW CS4.
    Thanks for your help!
    Cheers!

    I don't have CS4, but if you look in the Preferences in the Site section it may have something there to adjust in that regard (Edit -> Preferences -> Site).  In CS3 it provides for allowing one to select whether they want to be prompted to upload dependent files.  In CS3, deselecting these options is supposed to not transfer any dependent files (mine is unchecked, but still prompts).  It may be different in CS4, but in that section there is a Help button that leads to explanations of the settings.
    The wondering I have is whether you are getting a prompt or not regarding uploading dependent files when you try to upload the file.  If so, then that would be where you indicate not to do so.

  • The DPS continues to NOT work with html files

    Hi Adobe guys...i try the last 2 days to upload one white page with one html file (1MB)...the procedure fails all time...I see the "Error During Download" message. And the server seems to produce abnormal big files (156 of 417 MB)....
    The other 2 projects was produced before your DPS update and contains multiple html files....Any reason for this? Thanks

    This isn't a DPS support site, but rather a community forum. You should contact Adobe via your support agreement if you're looking for technical assistance.
    The issue sounds related to how you're trying to use HTML files. We have HTML articles every month and don't have any issues.
    My only thought is that the folder you're selecting to include when you import your HTML articles has lots of extra data in it, which is bloating the size of the folio.

  • Html files with included php: related files, code color?

    Hi there,
    Wow, what an active forum!
    I have two questions about html files that include php.
    Almost all my html files have this structure:
    <?php
    (php stuff)
    require_once 'somefile.php';
    ?>
    (html stuff)
    My first question is, is there any way for DW CS4 to display the files included this way? At the moment, they don't show up in related file view.
    My second question is, is there any way for DW CS4 to display the html and php code in the file in a pleasant way? The php is not red as it is in pure php files.
    Definitely not wanting to change the way I code or to change the file extensions...
    Instead, wanting to change the SW settings to make my work easier.
    With gratitude,
    Smiles
    Andy

    Hi Brad,
    Thanks for your reply!
    > The PHP coding in a regular HTML page likely won't even work in a  browser
    That's a standard coding technique...LOL... Maybe I didn't explain correctly...
    My hundreds of pages validate XHTML transitional...
    You are quite right that browsers do not interpret php code, but the  browser never sees php code.
    I will try to explain again
    The html file starts with <? php (code> ?>
    When the browser calls the html file, the server knows to process the file as php.
    It processes the php, then returns some html headers, and follows up with all the html that is after the <? php (code> ?> section.
    Thousands of php coders work like this.It's a very efficient way of building a modular website while keeping html extensions.
    By the way, related files already show in CS4 if they are in the html code.
    Are you 100% sure you are correct about the CS5 inclusion situation? You won't know unless you have built an html file that looks like this.
    <?php
    require_once 'myfile.php'>
    ?>
    <body>
    hello html
    </body>
    Your myfile.php might look like this:
    <?php
    echo 'hello php <br />';
    ?>
    If you have never used php in an html file, you will probably need to add something like this to your .htaccess file:
    AddHandler application/x-httpd-php5 .php .htm .html
    It tells your server that php processes not only php files but also html files.
    Warmest wishes to all,
    Andy

  • Combining bookmarks .html files, and sorting

    Hi,
    (1) I know how to import bookmarks, but, once I import all of my bookmark .html files, (have 6)... than I go to show all bookmarks, I have 6 "unsorted bookmarks" folder tabs, and one "unsorted bookmarks" tab of my current bookmarks. How do I combine all of these into 1 giant .html file? Or is it automatically combined once I imported, to where I can export and it'll have all 6 old .html files and my current bookmarks?
    (2) I know how to sort bookmarks, and I like sorting by "location", but is there a way to export as .html file so it saves the .html book mark file by "location"?
    (3) In the .html file there is some sub description for each bookmark, such as "Twitter is a social networking site, where users tweet to other users blah blah", is there any way to delete this? I'd like it only to display the bookmark name and the URL (usually I'll have to click on the name and it'll open up the website), but I like the website to be typed out.

    -1- <br />Yes all those bookmarks.html files will be merged into Firefox, and when you 'export' from Firefox those 6 files will be in one html file. No those extra 'unsorted bookmarks' folders won't be automatically combined, you need to do that yourself.
    -2-<br />No, 'location' sorting isn't reflected in an exported bookmarks.html file. That type of 'sort' is temporary in the Library view, and doesn't rearrange bookmarks in the places.sqlite file which is what is exported in html format. <br />
    Save this code as a Bookmarklet and click on it to make an HTML page editable. <pre><nowiki> javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200</nowiki></pre>
    Once the page is 'editable', you will be able to cut and paste bookmarks from one place on the page to another.
    -3-<br/>This code when run in the URL bar ''(or saved as a bookmarklet)'' while a bookmarks.html file is being displayed in Firefox will strip the extraneous information from that bookmarks file. Just save the bookmarks file when the 'strip' is completed.
    <pre><nowiki>javascript:%20(function(){%20var%20ls=document.getElementsByTagName('*'),%20lsl=ls.length;%20for%20(var%20i=0;%20i<lsl;%20i++)%20{l=ls[i];%20l.removeAttribute('id');%20l.removeAttribute('last_charset');%20l.removeAttribute('icon');%20l.removeAttribute('ICON_URI');l.removeAttribute('last_modified');%20l.removeAttribute('last_visit');%20l.removeAttribute('add_date');%20l.removeAttribute('personal_toolbar_folder');}%20var%20e=document.getElementsByTagName('dd');%20el=e.length;%20for(var%20i=el-1;i>=0;i--)%20e[i].parentNode.removeChild(e[i]);%20alert('Cleanup%20Complete%20-%20Save%20as%20Web%20Page,%20Complete\n'+'('+lsl+'%20bookmarks,%20'+el+'%20descriptions)')})();</nowiki></pre>
    - brief explanation of Bookmarklets - <br />http://www.bookmarklets.com/ <br />http://en.wikipedia.org/wiki/Bookmarklet

  • Deploying static HTML files

    I would like to deploy an applet in Weblogic 92. Could you point me to the documentation to do achieve this.
    There is one html file which has the applet definition and the jars that it references...

    Hi Durga,
    The idle method of deployment in case of more number java server nodes and x number App Servers implemention.
    stop all App Servers instances and keep only CI online.
    Then logon using Administrator/equaliant authorized user
    Deploy your content.
    Start CI
    restart CI
    start DI (App Servers)
    here CI now takes care of keeping all App Servers in sync with the content of CI.
    I hope this gives enough guidence for you to accomplish your task.
    Regards
    Sekhar

  • How can convert HTML file into xml file?

    Hi,
    I am receving one HTML file as an input and i want to convert that receiving(html file) into .xml file.Is there any converter (tools)to do this.Pls if any give me the details with regard.
    Regards,
    mahesh.

    Use the HTMLEditorKit to parse the html file.
    this kit is having the callback methods which
    are called wenever the tag appears in the HTML
    stream.

  • Html file in web page composer

    hi expert,
    i have create one html file. the html file contain jsp script. the output is very well when i run it on my pc but when i put it in container of web page composer, the output is not display. why its happen?how can i use the html file that contain jsp script in web page composer?
    thanx in advance,
    faeza

    Hi
    You can create a new layout with width and height as per your requirements and use the layout in WPC.
    For creating new layouts, check the help link below
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/d2970be57f4ebbe10000000a11466f/content.htm
    Regards,
    Yoga

Maybe you are looking for