Using currentTarget.label as variable in path?

I have the following code:
<s:FormItem label="First" click="onItemFocus(event)">
      <s:TextInput id="First" enabled="false" text="some text here..."/>
</s:FormItem>
Which when you click the FormItem it fires this function:
protected function onItemFocus(e:MouseEvent):void
    var targetname:String = e.currentTarget.label;
     First.enabled = true;
     First.setFocus();
     First.selectAll();
Now as you can see the targetname variable value is 'First' and the ID of the textfield is 'First' so the next part of the question is, how do I use the targetname variable as the name of the component I wish to enable?
I was advised that I could do it with square brackets like:
[targetname]enabled = true; but I can't make that work, and as I have about 50 fields that need this setting an efficient way would be great.
The other possibility I have is if I can set a style for the the normal state, and then a different style for the normal w/focus??? Now that would be awsome as this would alow tabbing between fields too, which would be better under certain circumstances.
Thanks for any help you can provide.
Shaine

In main request, add navigation on department column or values. Then, you must have target request with filter "Is prompted" on department column.

Similar Messages

  • Using variables in paths to objects

    Hi
    I'm wondering how I can use a string in a declared variable
    for a path to an object. Here's an example:
    On the press of a button a variable is declared:
    _root.nextsection = "news";
    And later on I want to use the string "news" in a path, like
    this (on a frame action):
    if (_root.nextsection == "news") {
    this.nextsection.gotoAndPlay(1);
    As you can see in the second line I'm using the variable name
    as a path... but this doesn't work.
    Any suggestions?
    Thanks

    Depending of where your if statement is, if your
    this.nextsection is the
    same as _root.nextsection, since this is a string and not an
    mc, what it
    does is:
    "news".gotoAndPlay(1).
    If you had a movieclip named news in the _root, then you
    could do:
    _root[_root.nextsection].gotoAndPlay(1) // EQUIVALENT TO
    _root["news"] or
    _root.news
    Other option is:
    var mynextsection_mc = eval("_root." + _root.nextsection) ;
    mynextsection_mc.gotoAndPlay(1);
    Flash will evaluate your constructed string "_root.news" to
    an object and
    return it, if it doesn't match anything, then you will get an
    undefined.
    JG
    "Cetrez" <[email protected]> wrote in
    message
    news:ejqacs$q6r$[email protected]..
    > Hi
    >
    > I'm wondering how I can use a string in a declared
    variable for a path to
    > an
    > object. Here's an example:
    >
    > On the press of a button a variable is declared:
    >
    > _root.nextsection = "news";
    >
    >
    >
    > And later on I want to use the string "news" in a path,
    like this (on a
    > frame
    > action):
    >
    > if (_root.nextsection == "news") {
    > this.nextsection.gotoAndPlay(1);
    >
    > }
    >
    > As you can see in the second line I'm using the variable
    name as a path...
    > but
    > this doesn't work.
    >
    > Any suggestions?
    > Thanks
    >

  • Get (variable) file path and name in a text element

    How do you get the (variable) file path and name in a text element (label) in LCD? If you save the PDF and afterwards relocate it, it should update the values. Is that actually possible?

    Does anyone have any advice on this issue?
    Thanks in advance,
    Zack H.

  • Best practice for using anchor labels?

    I am looking into using anchor labels for the first time and
    I am thinking I cant use them for this site because I am using xml
    and other variables that are being passed in on the first frame but
    maybe there as a chance that it still works. So I would like to
    know the best ways to use anchor labels. Someone who has used them
    please let me know.
    Thanks,
    Randy

    I've used anchor tags in Dreamweaver a lot, but never in
    Flash

  • How to use wild card with variable in powershell

    HI
    i am trying to use wild card with variable but getting an error message, "You cannot call a method on a null-valued expression."
    $src = 'C:\Temp'
    $TabletzipPath = $src + "tab*.zip"
    i would like to copy the tablet zip file which is placed in in $src to be copied in $TabletzipPath.
    i am using tab* because this file name changes continuously. so if i give a fix name for example tablet1.zip than it works fine.

    Not sure if the wildcard will work without seeing how you're using the variable.
    That said, I can say that it looks like you're missing the backslash between the $src path and the wildcard filename. As-is the above code assigns a value to $TabletzipPath of "C:\temptab*.zip" instead of what you are likely expecting ("C:\temp\tab*.zip")
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • Query Variable - Replacement Path

    Hi all,
    I would need to fill a query variable (based on calendar week characteristic) with specific list of values. I need all calendar weeks that are present in infocube, but only if key-figure > 0. So I've created a query with cal. weeks in rows and with suppressed zero rows. Output values from query contains exactly what I need.
    Than I created a variable (replacement path) with reference to mentioned query. But it seems to me that the variable does not contain all values displayed in the query, but only filtered values (if I use some restriction of cal. week).
    Is it possible to achieve this using replacement path at all?
    If not I would appreciate any idea or experiences how to accomplish this requirement.
    Many thanks,
    regards,
    Pavel

    Hi Pavel, I didn't get your requirement 100% . Still, I would like to tell How Replacement path works.
    First of all for the Source query you have given condition to restict the output of the query on particular keyfigure value > 0 ......  Right.
    Now on second query, you have created the Characteristic variable with Replacement path....here some important things to look at.
                    while creating the variable, select Processing Type as REPLACEMENT PATH, then in the "Replacement path" Tab,  give Replaced variable with.. "Query" ...and at bottom, For QUERY give the query name.
    If u want RRI facility from Source Query to Target Query, then u give RRI Connection in T-Code : RSBBS....
    ...and now when u execute the Second Query, First the first Query will be executed and those filtered values > 0 will be passed to the Second Query's variable input...then the second query will be executed...
    But, in your case check once again all settings in Variable in Second Query..and Conditions block in First Query..
    It should definitely work...
    ---Intros.
    Edited by: Intros on Apr 25, 2008 1:31 PM

  • Using Hidden Fields as Variables

    I am limited in my JavaScript coding abilities. I am building a rather large homeowners insurance application that ultimately computes the premium. There are a ton of options that affect costs and I need a way to store a few numeric values. LC Designer doesn't appear to allow numeric variables (only string variables). As a work around, I have started to setup some hidden numeric fields to store some values and have their values change according to the users actions. I think this is going to work but is inefficient--the PDF ends up containing a lot of information about these hidden fields that is totally irrelevant to the task being asked of them. I thought I should ask a couple of questions before I get too far down the path I am taking.
    My question #1: what are the other caveats in doing it this way?
    My question #2: is there a better way or work-around that is relatively easy to do? (I am not stupid, but I am not much of a coder either). If someone could provide an example of something that can act like a numeric variable (easily accessed & changed) I would be most grateful.

    Paul,
    I have tried without success using the form properties variables tab for entering variables. There is absolutely no documentation on the specific manner in which this is done, or whether it can accommodate arrays. I mean absolutely no documentation that I can find other than references to the LC feature like: "enter variables in the variables tab of the form properties," period. Great! but tell me more please, like specifically how?
    Other than the name of the variable and a value, are there supposed to be:    
    "var"
    "="
    syntax needed, you get my drift, I hope.
    And, what about arrays? And, does it matter if these values are intended to be numeric?
    I think I would prefer to use the variables tab because it centralizes their location, and in some cases I may need to change ones I might use as constants, down the road. This becomes much handier for that.
    Stephen

  • Preselection-variable (replacment-path: replacement with query)

    Hello Expert's
    Can you explain me, how we can set up a pre-query with characteristics and key figures.
    e.g.
    Due the performace reason in the olap process, we have the calculate a range of values before
    in query 1. This query contains characteristics and key figures.
    In the query 2 we've preselection-variable (replacment-path: replacement with query) to query 1.
    My question is, how we can get also the key figures-values from query 1, to continue to use the values for query 2?
    Thanks for feedbacks,
    Regards

    Hi,
    As this is the variable restriction and variable restrictions are not put on key figure values (except RKF). As I know you will not be able to get key figure values using replacemtn path with query.
    Regards,
    Durgesh.

  • Retain call info using dynamic label

    Hi
    Im using dynamic labels together with vxml app so depending on what e164 number the fromExtvxml variables is populated with the dynamic label diales to these extensions. Only problem with this as you all may know is that after label node in a dynamic label the script cannot continue. As i also need to have queuing if the dialed out phones do not answer. How could this be accomplished? Is there any way to use last label to be a dialednumber plan pattern or something else? I could for some smaller customers use a separate dnis / script for queuing but it will not fit all needs in the long run.
    Sent from Cisco Technical Support Android App

    I solved it. It works perfectly fine to do queuing after a dynamic label. Dont know why others says it does not work
    Sent from Cisco Technical Support Android App

  • Modbus Ethernet read and write to a Eurotherm 6180XIO Modbus server using LV8.2 shared variables

    I am having EXTREME difficulty trying to establish communications with a Modbus device using LV8.2 shared variables.  The device is a Eurotherm 6180XIO Datalogger configured as a Modbus master.  The PC and a cFP-1804 are slaves.  All IP addresses are set correctly.  This approach using shared variables would seem simple, but I can't find any examples or proper guidance on how to get it working.  I am trying to avoid having to mess around with TCP/IP, OPC, or any other old-fashioned method.
    I have read many threads on related topics but none directly apply to this situation.  I have created a library containing a Modbus I/O server and shared variables bound to read and write holding registers.  I have followed all recommended tips for creating such variables but I can neither read or write data.  All data types are U16 due to Modbus protocol limitations.  I have also applied the LV x10 factor in the most significant digit in the register offset (6 digits instead of 5).
    I have a cFP-1804 on the same network which reads into the datalogger OK.  The registers I use are 31000 (for CH0 on module 0, 31002 for CH1, etc) and the data can be read as FLOAT32.  I have updated the firmwate on the 1804 to the latest level.  I cannot even get shared variables to read SGL values.  Using registers 301001 for CH0 and 301002 for CH1 I can only read U16 values, and not a 2-word SGL.
    Third party Modbus simulation software is able to write to and read from registers very easily, but not LabVIEW.
    Some questions are:
    - do I use a Modbus master or slave as an I/O server in the library as a target for binding the shared variables?
    - is there some other wierd translation in register offsets between LabVIEW and traditional Modbus?
    - is this actually possible using shared variables or am I wasting my time?

    Sending the whole 60-character string using a string or array would be the most efficient.  I have tried both methods, and these only cause the datalogger to flag a message log but no text is displayed.
    For a string variable, I have used the following binding "My Computer\Modbus Test.lvlib\ModbusServer6180\442305", where ModbusServer6180 is a Modbus I/O server configured with the logger IP address, and 42304 is the register offset at the start of the text block in the logger.  I need to write to 30 consecutive registers starting with this one.  I am not using buffering and have not enabled single writer.
    Can anyone confirm whether this method should work in 8.2?
    Does the string need a special termination character?

  • Using Spry Data Set Variable in Recordset

    I have a page that contains a spry data set and a recordset. The recordset uses one of the variables from the spry data set to filter its results. how do I apply the spry data set variable to the recordset?

    I believe passing this the variable through the URL requires you to update the page, right?
    Yes
    Is there anyway to grab the spry data set variable direct and apply it to your recordset filter?
    The SpryDataSet variable can only be used on the clientside (JavaScript) so you will have to get your recordset using JS.
    A page refresh can be set in motion if you add {useCache: false, loadInterval: 500} to your dataset to then set an observer to your dataset to invoke the page refreash function.
    Gramps

  • Using LIKE with a variable in a report query

    Probably an stupid question, but I can't find the answer on this forum or by trying. How do use LIKE and a variable together in a query?
    The following solutions don't work f.e.:
    LIKE :P310_ENTITEITID%
    LIKE ':P310_ENTITEITID%'

    Hi Elmo
    Try '%'||:P310_ENTITEITID||'%'
    Elsie

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • Given filename or path contains Unicode or double-byte characters.Retry using ASCII characters for filename and path What does this mean? it happen when I publish an OAM

    Given file name or path contains Unicode or double-byte characters. Retry using ASCII characters for filename and path
    What does this mean? It is happening when I try to publish an OAM for Dreamweaver.
    Also: How can I specify the browser in Edge Animate? It is just going wherever. Are there no Preferences for Edge Animate?
    BTW. Just call it Edge. Seriously. Do you call it Illustrator Draw? Photoshop Retouching?

    No, my file name is mainContent.oam
    My project name is mainContent.an
    This error happens when I try to import into Dreamweaver. Sorry, I wasn't clear on that earlier.
    I thought maybe it was because I had saved my image as a png. So re-saved as a svg, still get the error.
    DO I have a setting is Dreamweaver CC that is wrong? Should I try this in Dreamweaver CS6? I might try that next.
    Why is this program so difficult? I know Flash. I know After Effects. I can work the timeline part just great. It's always in the export that I have problems.
    On a MacPro, 10.7.
    Are you an Adobe person or just a nice helper?

  • Using wildcards in URL variables (very simple question, i know)

    Hi all!
    Pulling my hair out over this... How do I use wildcards in URL variables? I have this code in compositionReady (which is working):
    var myurl = "http://www.mydomain.com/sub1/sub2/pagename";
    var currenturl = window.location
    if(myurl == currenturl) {
        sym.getSymbol("symbolname").play();
    It simply makes the symbol "symbolname" play when the current URL matches the variable 'myurl'. However, I want the symbol to play on ALL subpages to http://www.mydomain.com/sub1/sub2/ and therefore it seems logical to put in a wildcard like:
    http://www.mydomain.com/sub1/sub2/* or something similar, but I just can't seem to make it work??
    Any help will be greatly appreciated!
    Best,
    Thomas

    What about this ?
    var mysubdomain = "http://www.mydomain.com/sub1/sub2/";
    var currenturl = window.location.toString();
    if(currenturl.indexOf(mysubdomain) === 0) {
        sym.getSymbol("symbolname").play();
    -Dharmendra

Maybe you are looking for