equivalent innerHTML

Hi everyone I need your help (sorry for my English)

Let's say I have this element:

< mx:VBox id = "test" click = "insertMxml (event)" >

< / mx:VBox >

And I want to insert mxml inside dynamically when the user clicks on the element or do something else on the page.

in javascript, I'll simply write:

< script >

insertHTML() {} function

test.innerHTML = 'myHTML <>stuff.

}

< /script >

< mx:script >

public void insertHTML(event:MouseEvent):void {}

what I would do in flex...?

}

< mx: / script >

Thanks much head!

You cannot add 'mxml' when running, but since mxml is indeed pure AS3, you can. Use the AddChild method to do this.

...

private void insertMxml(evt:Event):void

{

var myComp:MyCustomComp = new MyCustomComp();

evt.target.addChild (myComp);

}

You can do this as simple or as complex as you want. The easiest way is to make a custom component and add an instance of it to a Visual container (in this case, a VBox).

You can delete childs by using methods such as removeChildAt removeAllChildren...

Dany

Tags: Flex

Similar Questions

  • using innerHTML to change the values of a textfield does not?

    I was wondering why this line is not working on a text field...

    document.getElementById('P1_Name').innerHTML = "invalid error";

    If P1_Name is a Text_field it does not work...

    but

    If P1_Name is a component TextArea, it works...

    No idea how to get around this problem...


    * I'll probably use pl sql, but just wonder why this will not work until this is strange for me.

    PandaOracle wrote:
    I was wondering why this line is not working on a text field...

    document.getElementById('P1_Name').innerHTML = "invalid error";

    If P1_Name is a Text_field it does not work...

    The content model for "text fields" (input type = 'text' elements) is 'empty', i.e. the element is not a container for other content. Like innerHTML property that is the content of an element - nodes HTML and the text it contains, it is not valid for the input elements.

    If P1_Name is a component TextArea, it works...

    Content model of "text boxes" (textarea elements) is 'text': the element is a container for text nodes. So its innerHTML property can be used to get and set the content of this text.

    No idea how to get around this problem...

    input elements have a value attribute rather than the text content. The property equivalent value can be used to get and set this in JavaScript:

    document.getElementById('P1_Name').value = 'Error not valid';
    
  • How can I uninstall Sierra &amp; return to El Capitan without an external hard drive or equivalent required by the instructions online?

    How can I uninstall Sierra & return to El Capitan without an external hard drive or equivalent required by the instructions online? I find too many misadventures and not happy.

    Hello

    Check out this useful tutorial: https://www.igeeksblog.com/how-to-downgrade-macos-sierra-to-mac-os-x-el-capitan/

  • Workout App does not define 'fast market' equivalent?

    When I use the app to drive on my Apple Watch when I went up on a normal bike, not all of my journey is considered to be a workout.  I can be riding for an hour, but the app decides that the only parts of this time count for a workout.  The explanatory note said I have to do the equivalent of a brisk walk.  What is c?  Is it using my pulse?  If so, it's too bad because I take the medication that slows down quite to the bottom of my heart rate and it is very difficult to be in green all the time.  My bike course map is painted in green, yellow and Red areas.  So if I stop briefly for traffic, it is red and does not count.  If it's yellow, it doesn't count... so it appears.  This means that a one hour bike ride can have only 15 minutes of training time.  That makes no sense to me.  Have I not that bad?

    Tracy Rog wrote:

    ..  The explanatory note said I have to do the equivalent of a brisk walk.  What is c?  Is it using my pulse?  ..

    Progress towards your daily goal of exercise of credit, the application of the activity is to identify the activity equal or exceed the intensity of a brisk walk. This requirement applies as well to the general course daily wear and record training sessions through the training exercise credit app which is awarded for each minute during which this condition is met.

    The definition of a brisk walk varies from one person to another and depends on your personal information.

    To verify that this is correct - and update over time:

    • On your iPhone, in the application of the watch, go to: My Watch (tab) > health > edit - tap and adjust the settings, then press on in fact.

    Apple Watch uses different sensors and data sources to track the results of training sessions, depending on the type of activity. For example, with Apple Watch (first generation) and the models of series 1, the watch can access data matched iPhone GPS if it is taken along during the walk outdoors, running and cycling training. (Series 2 has built-in GPS).

    Calibrate your watch can improve the accuracy of the estimates made by the activity and workout app app. More information and instructions for calibration of your watch are available via the link below. The article also includes instructions for resetting the calibration data and leave.

    If you prefer to receive credits of exercise during the duration of your training sessions, regardless of their estimated intensity levels, follow them through the application of the training session using 'Other' as the type of activity. This credit a minute of exercise for each minute of the workout. Active calories will be estimated at a rate equivalent to a brisk walk or based on the data recorded by the heart rate sensor, according to what is higher.

    More information:

  • CTRL + SHIFT MAC equivalent mode icon

    New Mac user here:

    Is there a way to do an equivalent to Ctrl-Shift file selection icon?

    I get in the view of the list in now Shift, but in icon mode Shift seems to behave as a control, add individual files to the selection, rather than all files between the first and last selected...?

    Unfortunately, no. To do this, I suggest you drag the slider with the trackpad (or mouse) to select all the files at once.

  • I'm looking for the Mac key combination which is equivalent to Alt + Tab in Windows that allows you to choose Open Windows (toggle).

    I'm looking for the Mac key combination which is equivalent to Alt + Tab in Windows that allows you to choose Open Windows (pass) but I can't find this info.  I hope that someone will tell me what combination of keys and as a bonus, where I can find it in the menu help. Thank you!

    The standard keyboard shortcuts are listed here:

    Keyboard shortcuts in Mac - Apple Support

    You can also define your own in System Preferences > keyboard

  • Equivalent of Mac for gthumb

    Gthumb Linux is excellent for photos sort by date - is there a mac equivalent for gthumb? Thank you

    Probably not many people here know gthumb - at least I don't have. But the application overview does not approach?

  • Is there an equivalent to press a hashing key when asked to do so during the phone call on Apple Watch?

    Is there an equivalent to press a hashing key when talking about Apple Watch phone app. ?

    I tried to leave messages on the voicemail of the recipient but to end leave my message, I wonder to press the pound key, which I can't do the watch.  I tried pressing the red button "end" on the dial of the watch, but that has not worked.  I ended up having to take my phone out and starting from scratch.

    Thanks in advance.

    Hello

    If you want to suggest that Apple consider adding a hash key to use when making calls on Apple Watch, you can do so here:

    https://www.Apple.com/feedback/watch.html

  • Can not find the equivalent Australian model us Qosmio X 75 - A7295

    Does anyone know the Australian model of the equivalent of what I found on an American website:

    Black 17.3 "Toshiba Qosmio X 75 - A7295 computer laptop PC with processor Intel Core i7-4700MQ, 16 GB memory, 1 TB hard and Windows 8

    I can't align with the Australian version Toshiba models.

    Computers notebooks are specific products of these countries, and very often the same models are not available in different markets. If you're in Australia check Qosmio models offered in your country and pick up a better hardware configuration.

  • Equivalent of greprefs/all.js in Firefox 6.0

    In the previous version (3.x) of Firefox, there was formerly all.js file in the greprefs file. This file is used to control the many options of Firefox.

    I do not see the same in the latest version (6.0).

    What is the equivalent file in version 6.0 of Firefox?

    It is now greprefs.js in omni.jar

    resource:///greprefs.js
    
  • Is there an equivalent in Firefox for the element.style ['javaScript css_to_change']?

    I'm doing a site compatible for Firefox, but the element.style ['CSS_to_change'] doesn't seem to work (example: document.getElementById('element_ID').style [' - moz - transform "] ="rotate (90deg)"; must turn the item whose id is 'element_ID' at 90 degrees). It works in Google Chrome and I wonder if there is anything equivalent with it in Firefox...
    I'm sorry if I ask this question in the wrong place and I thank you in advance! Please let me know when you have an answer.

    Try this:

    document.getElementById('element_ID').style.setProperty('-moz-transform','rotate(90deg)','');
    javascript:void( document.getElementById('question').getElementsByTagName('IMG')[0].style.setProperty('-moz-transform','rotate(180deg)',''));
    
  • Drivers for Dynabook E7/518PME. ? equivalent to 1130/1135

    Does anyone know an English equivalent to the Dynabook E7/518PME, so I can download the drivers who work with her.

    Rgrds

    Chris

    Hello

    As far as I know, this laptop was delivered only for the Japanese market.
    Unfortunately, I'm not very familiar with the portable computers m Japan, but I found a site with a list of the hardware specification.
    http://Linux.Toshiba-DME.co.jp/Linux/Eng/spec.php3?model=PAE7518PME

    You can try to check other drivers for portable computers with the same hardware. Maybe these drivers work correctly.
    http://EU.computers.Toshiba-Europe.com/cgi-bin/ToshibaCSG/download_drivers_bios.jsp

    Good bye

  • orders, equivalent to internet Explorer

    is there a list of order comparisons between internet explore and firefox? for example, < ctrl > + < update > will force completely recharge and refresh a page of internet explore. What would be an equivalent of firefox? Thank you...

    http://support.Mozilla.com/en-us/KB/keyboard+shortcuts

  • Is there an equivalent ATI card to NVIDIA GeForce 6600 Quad G5 PowerMac?

    On a french forum, trying to help another Member of the forum, we look for an ATI card equivalent NVIDIA GeForce 6600 PowerMac G5 Quad.

    The specifications here: http://www.everymac.com/systems/apple/powermac_g5/specs/powermac_g5_quad_2.5.htm l

    Thank you in advance for your help!

    Hello

    G5 PCIe options are listed here:

    http://www.jcsenterprises.com/Japamacs_Page/blog/71BBF3EF-9713-4C53-8B80-26771F8 A4087.html

  • Equivalent DAQmx claims NIDAQ orders

    Then I start to excavate in the VB6 code that has been written about 8 years ago by one of my engineering students.  Best I can tell, some of the first calls the NIDAQ functions are:

    INIT_DA_BRDS()

    AO_VWRITE()

    Basically, he checked to see if the status returned by the INIT_DA_BRDS() has led to a valid installation (by returning a code number device valid).  If so, then we send a voltage to the Commission D/A, using the AO_VWRITE().

    So, who can tell me what are the equivalent DAQmx features?

    Hi BorgWarnerNVH,

    I can see in this link: VB6 NIDAQ-DAQmx Conversion you requested advice to convert this code, in fact, this document: transition is the most suitable for this conversion. The situation is that DAQmx in how to use the functions is different because we use tasks, so it is more difficult to find as an equivalent function. But I recommend to use examples of supported text code for vb6, here you can view the help NOR-DAQmx C API Visual Basic 6.0, you have installed?

Maybe you are looking for

  • Re: Toshiba Satellite Pro L300 - 24L and support

    Hello I need help on my laptop, which was bought in France a few years ago.But the 24 L does not appear in the Toshiba laptop model available on the sites Web French.My serial number does not work also. Is this normal?I'm sure it's a French model, bo

  • Satellite A350 - I need a new servant key

    Hey everybody. I own a Toshiba Satellite A350. Last night, my arrow clicked out of place, and now I'm sure that among the main features of restraint is broken, only a tiny part of any restraints is broken, and the key pegs not in place. I went at lea

  • How can I disable the smart Suggestions (calendar and contacts) on the Mail application?

    Hi all I want to know if it is possible to disable the intelligent Suggestions on Mail App on El Capitan? I don't want to see the suggestion to add an event to the calendar when I receive an email with a date or a time inside. Thank you very much for

  • Upgrade Envy 15 t-j000 Quad Edition CTO to widows 8.1 Pro

    I just rebuilt my notebook of Quad Edition CTO Envy 15 000 t for Windows Professional 8.1 but under other devices, I have a PCI of Simple COmmunications controller by mistake with the following hardware ID: PCI\VEN_8086 & DEV_8C3A & SUBSYS_1963103C &

  • requested operation requires elevetion

    Hello I signed up as a user administrator, I am trying to install something and it wouldn't let me install it for some reason I get this message "requested operation requires a rise" I have windows 7. Help, please. Thank you