Load HTML into TextField or Text Components!

Hi all!
I'm trying to load 4 HTML documents into 4 different TextArea
components (infoTxt1, infoTxt2, infoTx....). In the attached code I
use/load the same HTML document to populate the components just to
simplify the testing.
This loop will not work. Can anyone tell me why or if there
is a better way to load several HTML into components dynamically?
It works IF it only loop once.
Thanks

YEAH!
TRULY AMAZING, KGLAD :)
Sorry for shouting out, but I just love to get this kind of
help. I would never have figured this one out by my self and the
good thing is I actually understand what's going on in your code
and can use that in other cases.
You came through as you you always do, and a million thanks
for taking the time.
Have a wonderful day :)
Answer:
To load several "html" documents into several textarea
components on stage you can use kglads code:
var dataNum:Number;
loadDataF(1);
function loadDataF(n:Number) {
dataNum = n;
this["tabData"+n] = new LoadVars();
this["tabData"+n].onData = function(theText:String):Void {
if (theText != undefined) {
_root["infoTxt"+dataNum].text = theText;
trace(_root["infoTxt"+dataNum]);
if(dataNum<4){
dataNum++
loadDataF(dataNum);
this["tabData"+n].load("artist"+n+".html");

Similar Messages

  • Load HTML into a Tabbed Panel?

    Can I load another URL Into a tabbed panel's main div? In
    other words, I click on a tab and then the Tabbed Panels' Content
    area loads up an HTML page into it's div. I know of similar
    frameworks that can do it but I haven't seen it done in Spry
    yet.

    Hi Data,
    Check out UpdateContent and see if that will do what you
    need:
    http://labs.adobe.com/technologies/spry/samples/utils/update_content.html
    Thanks,
    Don

  • Adding html into edge animate text box from external js file

    I have a text field in edge animate that I want to update with a score. The function that is used to click and update the score is in an enternal file so I'm trying to figure out how to get my edge animate div to be read by jquery in the external file. This is what I have so far in the external js but it isn't reading the edge animate text field properly:
    external .js file:
            AdobeEdge.coinCounter += 250; // this calls the variable coinCounter which was set in edgeActions.js and updates it from the original 0 value
                    alert(AdobeEdge.coinCounter); // this shows it works and updated correctly
           var comp = AdobeEdge.getComposition("EDGE-172492634");
           var stage = comp.getStage();
         stage.sym.$("gameText").html(AdobeEdge.coinCounter); // this is where things go wrong. I want this updated value to read back into the textbox called "gameText" that is in the edgeAnimate composition
          stage.sym.$("gameText").html("NewText"); // nothing reads to the "gameText" textbox; something must be wrong how I am referencing it outside of edgeActions in the external .js file
    Would someone mind helping me reference the textbox "gameText" correctly so I can input my new value? Thank you!!

    Thank you. The learning curve is taking me awhile. It works now:
        var checking = AdobeEdge.getComposition("EDGE-172492634").getStage().$("gameText").text();
        alert(checking); //yay!
    Thanks Joel!

  • Load html again...

    Hi all,
    There are lots of topics in this forum about loading HTML into applet, i tried to find answer from them to solve my problem, but i can't get the expected anwser, can anybody look at my problem, thanks.
    I copy the codes from JTree tutorial( http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html ), and try to create a Jar file of it, but the html pages can't be loaded. The codes are:
    private class BookInfo {
    public String bookName;
    public URL bookURL;
    public String prefix = "file:"
    + System.getProperty("user.dir")
    + System.getProperty("file.separator");
    public BookInfo(String book, String filename) {
    bookName = book;
    try {
    bookURL = new URL(prefix + filename);
    } catch (java.net.MalformedURLException exc) {
    System.err.println("Attempted to create a BookInfo "
    + "with a bad URL: " + bookURL);
    bookURL = null;
    private void createNodes(DefaultMutableTreeNode top) {
    DefaultMutableTreeNode category = null;
    DefaultMutableTreeNode book = null;
    book = new DefaultMutableTreeNode(new BookInfo
    ("Print",
    "hf/PrintHelpfile.htm")); //******file can't be loaded
    top.add(book);
    //Tutorial Continued
    I know getClass().getResource("hf/PrintHelpfile.htm") can solve the problem, but i tried several ways to put it into the createNodes method, seems still can't...
    Anybody can give me some suggestions, it already take me the whole day...
    thanks in advance
    dejie

    problem sovled

  • Passing formatted HTML into JOptionPane.showMessageDialog()

    I'm attempting to display a message dialog that contains text that is formatted as HTML. The examples I've looked up online show that you can indeed create a string that begins with the tag <html> and pass that string into most swing text components.
    Such as:
    String htmlString = "<html><b>This is a bold string</b>";
    JOptionPane.showMessageDialog(htmlString, ...);I want to do the same thing, but have my HTML stored in a seperate file. I tried using file IO to read in the html one line at a time, and append it into a StringBuffer. Then passing my buffer.toString() into showMessageDialog(). ..It's still not showing my HTML (although it does compile fine).
    Before I start digging into this deep, I just wanted to ask if there was a better solution for accomplishing what I'm trying to do here. Perhaps using a different component or something? I appreciate it.

    (shrugs) Both these examples seem to render the HTML OK, the first is a String provided to a JLabel, the second is an URL provided to a JEditorPane. I included the second to show a Swing component rendering HTML from an external source.
    import java.awt.Dimension;
    import javax.swing.JOptionPane;
    import javax.swing.JEditorPane;
    import java.net.URL;
    class TestHtmlRendering {
      public static void main(String[] args) throws Exception {
        // default for a String in a JLabel is bold,
        // so let's add some emphasis..
        String content =
          "<html><b>This is a bold, " +
          "<em>emphatic</em> string!</b>";
        JOptionPane.showMessageDialog(null, content);
        // styled HTML from http://pscode.org/test/docload/
        URL url = new URL(
          "http://pscode.org/test/docload/trusted.html");
        JEditorPane jep = new JEditorPane(url);
        jep.setPreferredSize(new Dimension(300,200));
        JOptionPane.showMessageDialog(null, jep);
    }I'd say the problem is in the code you did not show, though even the code you did show, was nonsense (show me the URL to the JavaDocs of any showMessageDialog() method that will accept a String as the first argument). For those reasons (and more), I recommend preparing an SSCCE that shows the problem. It is a little harder to prepare an SSCCE involving external files, though if you can demonstrate it using an URL (like above) that solves the problem.

  • Javascript: loading file into variabele

    Hi,
    I want to be able to read html from a file into a variabele.
    this way i can use the following function to place the html in a <div></div> element.
    //load html into div with div id putted in.
    function loadhtml(id) {
    //here the variabele html should get it's content from the given html file.
    var html= ?????????????;
    if (document.layers) {
    with (document[id].document) {
    open();
    write(html);
    close();
    } else {
    document.getElementById(id).innerHTML= html;
    This way this way i have some kind of floating frame which is tranparent. (and it work on IE as wel as on NS)
    If someone knows how to do this please let me know!!!!
    Thanks in advance.

    Well it is not too difficult to do that with PHP.I learned PHP in a few days. On http://www.phpbuilder.com you can find some examples that could be very useful for you. If you want the PHP tutorial, you can contact me for it... E-mail on [email protected]

  • Load XML content into HTML enabled TextField

    I'm trying to figure out how to use html such as <br />
    loaded from an XML element into a TextField.. if I use something
    like
    <desc>my description<br />line 2</desc> I
    get 3 nodes instead of one when loading the XML file. If I use
    something like <desc>my description&lt;br /&gt;line
    2</desc> then I get <br /> in the actual text.
    Can anyone clue me in as to how to store HTML in an XML
    element so I can load the content into a Dynamic TextField with
    HTML enabled?
    Thanks much!

    use the latter in your xml and use the htmlText property of
    your html-enabled textfield to display your text.

  • Trying to load a javascript link from text file into a dynamic textfile

    Can anyone help me with this problem? Im trying to load in a
    newsfeed from freshcontent.net into my text field. If i put this
    javascript link on an html page, the page shows correctly, which is
    im supposed to get 3 dynamic links with news content headlines.
    Please view the link to see what i mean:
    http://www.freshcontent.net/directory/real-estate/real_estate.html
    Now, i cannot get this same type of display behavior in my
    text field if i just paste into my text file the javascript link
    thats supposed to bring up the 3 headlines. It is my understanding,
    that flash cannot do this without some sort of specific
    actionscripting, that involves asfusion, and/or externalInterface.
    Im not sure exactly how to go about setting this up to make this
    work. My current code looks like this:
    If anybody could tell me where im going wrong and what i
    should change in order to get the desired result im going for, Id
    very much appreciate it. Thanks

    well sorry there fanmap - but I don't think you're going to
    be able to get this to work. here's why: the link points to a php
    file - which gathers dynamic info from a DB - the return from the
    php is generating a string that is based on the DOM and
    'constructs' a javascript method that in turn writes to the html
    document. although we can embed html into a textField in Flash
    there are a limited number of supported html tags - and JS methods
    will not operate internally. in addition, (i'm not certain someone
    correct this if i'm off) there's no way to 'change' the output of
    the php call, therefore you will not be able to read the return
    because it is designed to use the DOM and write solely to the
    current document. Even if you were to access the JS method from the
    swf file (which one can) it will still only write the content of
    the php return to the html document - and the output is not
    compatible with the textField class.

  • Dynamically load content into a "template" swf from text file

    I have a dream....
    Well, I have a concept. I have not actively pursued Flash in
    several years, though I've continued to have it in my arsenal. I've
    not done much in the action scripting realm for a while though.
    I am trying to create a template that will be used for about
    100 different product pages.
    It would have two tabs, basically, 2 different graphical
    button sets. One will have up to 4 links to similar products, each
    tab will be on the side of a square, and I need the ability to not
    display a tab if there is no actual link.
    As for the other tab, Its a menu that consists of a series of
    lines. This can be an external menu, I just need a way to have
    flash load the right menu. This menu, when you mouse over a line,
    the name of the product appears, as well as a product image that
    gets loaded with the menu. The product images would be external,
    allowing me to simply replace an image if a new higher end version
    of the product comes out.
    So, I am totally not an actionscripter. Looks like I need to
    load variables from an external file. Can I set a property in the
    flash code on the html that tells the movie what dataset to grab
    from?
    Here's basically what I am looking for
    property: value
    (load variables for:)
    item: 44
    (menu1)
    faster: 54b.html
    slower: 34d.html
    left: 43d.html
    right: 45c.html
    (menu2)
    menu:graph5.swf
    (menu loads images from external source)
    link51: 51d.html
    link52: 52c.html
    link53: 53c.html
    link54: 54d.html
    link55: 55b.html
    link56: 56d.html
    A possible third menu would be text driven, and would use
    html to link to various items.
    This is a static site, so urls will be fixed.
    Is it best to build a php page that serves up data for a
    single item, or do one big text file with all 100 or so items? Is
    that even possible?
    My Flash since MX is very rusty. I am using Flash Pro8. I
    would love to create a single file so modifications are to the text
    files, unless a new item is released, then it's updating a single
    flash menu and updating the text file.
    Been spending way too much time in InDesign lately! I used to
    be pretty good at Flash!

    well sorry there fanmap - but I don't think you're going to
    be able to get this to work. here's why: the link points to a php
    file - which gathers dynamic info from a DB - the return from the
    php is generating a string that is based on the DOM and
    'constructs' a javascript method that in turn writes to the html
    document. although we can embed html into a textField in Flash
    there are a limited number of supported html tags - and JS methods
    will not operate internally. in addition, (i'm not certain someone
    correct this if i'm off) there's no way to 'change' the output of
    the php call, therefore you will not be able to read the return
    because it is designed to use the DOM and write solely to the
    current document. Even if you were to access the JS method from the
    swf file (which one can) it will still only write the content of
    the php return to the html document - and the output is not
    compatible with the textField class.

  • How to load a large amount of HTML into HTML region?

    I am trying to display a clickable image map (HTML <map>) in a region. The HTML source for the image map is fairly large and will not fit in the Apex editor (HTTP 400 error when I Apply Changes). I would also rather not manage that much HTML in the Apex web editor. So I stored the code in a file and added it to my applications file storage.
    I have tried various methods of getting the HTML to load when the page is rendered. I tried a URL region, but that leads to all kinds of ACL/security issues that we do not want the customner to have to deal with. i also tried some PL/SQL:
    DECLARE
    l_file_id NUMBER;
    BEGIN
    SELECT id
    INTO l_file_id
    FROM APEX_APPLICATION_FILES
    WHERE filename = 'myhtml';
    APEX_UTIL.GET_FILE(
    p_file_id => l_file_id,
    p_inline => 'YES');
    END;
    But that just replaces the entire page, not just the region it's defined in (even when the HTML is without <head> etc).
    Various attampes wih #APP_IMAGES#myhtml and &APP_IMAGES.myhtml just give me the translation of the APP_IMAGES variable.
    So, how do I load a large chunk of HTML into a region dynamically at run time? I also need this to interact with APEX in the sense that JavaScript will set APEX variables and cause a SUBMIT when the use clicks on the image map.

    Hi Andy,
    ATD wrote:
    Does your HTML define the regions/points on the map using AREA tags?Yes. it is actually generated using MapSefrver from huge tables of SDO_GEOMETRY (Oracle Spatial).
    If so, you could define a report template that does this and use this for a report based on a table that has the settings for shape, coords, href etcHmm, the code (HTML map) is auto-generated so if I understand you correctly, this might be difficult. One of the HTML is approximately 180KB of text.
    I found a way to do this using dynamic PL/SQL. I created a new table that has a varchar filename and a CLOB for the file data. I then imported the HTML into the table using SQL Developer (copy&paste, nice!). I then created an HTML region and used the following:
    declare
    html clob;
    len number;
    st number;
    c number;
    begin
    select length(data)
    into len
    from FILES
    where name = 'state_query.html';
    st := 1;
    while len > 0
    loop
    if len > 32000 then
    c := 32000;
    else
    c := len;
    end if;
    select substr( data,st,c )
    into html
    from FILES
    where name = 'state_query.html';
    htp.p( html );
    st := st + c;
    len := len - c;
    end loop;
    end;
    Edited by: CoyoteTech on May 13, 2009 7:27 AM

  • How can I make this possible? Loading another html, into a table?

    Hello everyone!
    Im using Dreamweaver CS3. I have a website thats all image based - which is not good because google or any search engine cant really pick up any keywords. So I have a table filled with images, Id like to take an image in the center out, and put in some type of code that says "load blah.html into the current row and collumn of this table. I attached an image of what I mean.
    Id like to do this because it will be easier for me to update 1 html file and have it load that into the master html file. Is this even possible?
    If anyone is interested in checking out the source of the page im working on please feel free to go here:
    http://www.ryandeyoung.com/home.html
    Thanks in advance for anyones help.

    TheFiend1 wrote:
    Well, I mean 1 row and 1 column, sorry - but when I go to type something in there it starts typing in the middle - is there a text field I can stick in that empty spot? Where I can write whatever and for it to be as long as I make it, without making the master table change in length?
    Here's an example of some scrolling text inside a table cell...
    http://dreamweaverresources.com/tutorials/scroller.html
    Easy enough to see how it's done, I've provided the code  :-)
    You can set up the scrolling div in the table cell and then use an include file to populate the text into that div...  that way,, you can make changes to the include file and it will be updated automatically on the page.
    Here's a quick and easy article on creating server side includes  (SSI).  Use this to create your 'include file' that goes into that scrolling div.
    http://bignosebird.com/ssi.shtml
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • Load multiple parts of an XML file into one dynamic Text Field

    Hi I am trying to load text from an external XML file into a dynamic text box. I have so far managed to load single parts of the XML file into a dynamic text field. I now want to be able to load different parts of the XML file (something similar to a string with appendText) into the same text Field.
    I have so far managed to achive this using the String and append text properties, but would like to use XML file to do it instead.
    Any tips please?
    Thanks

    In essence you can just do:
    TextField.text = XML.node1 + XML.node2;

  • How can I load a .TXT file into a dynamic text box?

    I am sure that many people know how to load a .txt file into
    a dynamic text box. But I do not. I want to be able to reference a
    txt file from the server into the text box. So that when I change
    the text file it changes in the flash movie without even editing
    the flash file itself. Thank you.

    http://www.oman3d.com/tutorials/flash/loading_external_text_bc/
    I think this is the simplest way to go :)

  • Is it possible to load HTML data into BW?

    Is it possible to load HTML data into BW,I have read in some places that is is possible but I cannot find much documentation on this on Google or other SAP sources.
    If anyone has some documentation or general how-to guides that would be great!
    Even a general overview in your own words would be a great starter.
    Thank You
    Points will be assigned

    Please check these links n see if it helps
    http://help.sap.com/saphelp_nw2004s/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/frameset.htm
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/icc/bw-udc-jdbc%20universal%20data%20connect%20jdbc%20interface.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/00/f01640dc88e769e10000000a155106/content.htm
    Regards,
    R.Ravi

  • Load external html into a Layer?

    I've created a framework of a kids' site using CSS layers to
    overlap a Skyline image overtop of another 2 layers, one showing a
    BG image of the sky, the other showing the scrolling content.
    For another section of the site, I would like to load an
    external HTML into the layer behind the skyline. Specifically, I
    would like a Blog to load and scroll behind the skyline. Anyone
    know if it is possible to load an external html page into a layer,
    and if so, how does one go about it?
    The (unfinished) page in question can be seen here:
    http://www.marcsobservatory.com/mo_mainpage6.html
    The stylesheet can be found here:
    http://www.marcsobservatory.com/mo_styles2.css
    Thanks!

    is the first frame of your loaded swf's empty?  if yes, then no problem using _levels.
    if not, do you mind a momentary flash when your next swf loads and before its _alpha is assigned 0 and then faded-in?  if you don't mind, then no problem using _levels.
    if you do mind that momentary flash, then using _levels will be more complex than using empty target movieclips.  is there some good reason to use _levels instead of target movieclips?

Maybe you are looking for

  • Single column index vs composite index?

    I am just wondering that what are the differences between the following? create table test( person_id number name varchar2(50), surname varchar2(50) create index my_indx on test(name); create index my_indx2 on test(surname); OR create index my_indx3

  • How do I get imported pictures (from my macbook pro) onto my iPhone 5?

    How do I get my imported pictures (from my macbook pro) onto my iPhone 5?

  • How to keep Single Songs out of Album View?  iTunes11

    What is the proper way to label singles so that Album View does not contain an 'Unknown Album' for each artist with at least one song?  You would think leaving the 'album artist' and the 'album' field blank it would not put that song in album view, b

  • UK VAT Reporting

    Good Morning I need some assistance with the set up and running of the VAT Tax declaration report for the UK. Is there any documentation that sets down some procedures for performing this function anywhere. Thanks Stuart

  • Dynamic Column choices Analyzer 72 with HFM

    Does anyone know how to setup a tabbed report group to show three different generations of the Period dimension in HFM? I would like to have a set of three radio buttons that let the user choose whether they would like to see 12 monthly columns, 4 qu