Access of the edittext field name

I created an edittext field and gave him the name "myText". That's what I tried.

Window.Edit = Window.add('edittext', undefined,undefined, {name:"myText"});
Window.Edit = func;

function func()
{
     alert(this.name);
}

However, I only get "undefined" as a result.

How can I fix?

I created an edittext field and gave him the name "myText". That's what I tried.

Window.Edit = Window.add('edittext', undefined,undefined, {name:"myText"});
Window.Edit = func;

function func()
{
     alert(this.name);
}


However, I only get "undefined" as a result.

How can I fix?

In fact, there are two problems in your code:

First, restore you Window.Edit func, so Window.Edit is no longer being EditText do you think it is.

Secundus, name is not a property of the construction EditText, so it is ignored at the time of construction of widget.

However, you can add a building after the property name :

var w = new Window('dialog', 'title');
w.edit = w.add('edittext');

w.edit.name = "myText";

// useless, but it works:
w.edit.getName = function(){alert(this.name);}

// etc.

@+

Marc

Tags: InDesign

Similar Questions

  • Hash in the database field name

    I have a domain name that has a square symbol (#) in the name. I have no control over the naming of this particular database structure. I need this output field. How the hell can I do that? How do I know if the output has a # in it, but what about the real field name?

    Thank you

    In the query, I do ' ACCOUNT # as Act ' (ACCOUNT # is the real name of the field)

    I had tried this before I posted, but it was a mistake. Copied the code into a new document to isolate all other variables on the page and now it works. Frustrating.

    Thanks for the quick response.

  • Instruments GPIB remote access through the GPIBConf device names

    Hello

    I am trying to run the Labwindows 2009 SP1 code on a PC based office while trying to exploit the GPIB instruments

    on another part of the network.

    Normally, this isn't problem with VISA server on the target computer and the use of names of Alias VISA within the

    Office PC code.

    But this code was inherited and uses a different method which has been the best over time.

    The code uses device name strings that have been defined using the GPIB utility: GpibConfig.exe,.

    on the target computer. So when a device is first initialized, the name defined in the GPIB utility is used

    by the code and the associate instrument access are reached. It works fine when the code and

    the instruments are located on the same PC.

    My question: is there some way I can use VISA access server remote GPIB instruments help

    defined names on the computer target with the GpibConfig.exe utility?

    Thank you

    Gary.

    The low-level GPIB functions have no knowledge functions VISA or aliases. This must be a very old application since the VISA has been around for 10 years. Have you always the source code so you can change your GPIB for VISA?

  • Programmatic access to the "required" fields

    Hello

    My form does not have a real submit button, so "kept" built-in is not function of the field of no use to me unless I can check by program the.

    So if I do 25 page 1 required fields, I don't want to have such a long statement checking if each has a null value.

    Is there a way I can "check" to see if any mandatory field is null? There may be a way to group fields in a table, or something - but it's beyond my capabilities at this time.  I'd appreciate any help!

    How did you film script to email through button?  By nature, using the button "submit" e-mail or normal button with him present URL like "mailto:[email protected] he should check the required fields are filled.»

    You can also simply put

    XFA. Form.Form1.execValidate ();  on the click event of the button.  This will force a check on required fields. (assuming that form1 is the top most name name in your) hierarchy

    Or as you have suggested more high loop through the fields check that they are required and if they are null.

  • The deleted field name cannot be used for a new field of a different type

    I use Acrobat XI in Windows 7 to create a form.

    A text area field was created and named "XYZ". The form has been saved and closed.

    During an editing session later, the field has been deleted, and the form is saved and closed.

    In another, later editing session, I tried to create a new field box to check named "XYZ". Adobe responded saying that the name was already used for a field of a different type, as well as the name "XYZ" could not be assigned to the field.

    I find no indication that any field that is named "XYZ" exists. How can I work around this dilemma?

    Thank you, George. You gave me an idea of the problem.

    No, the field does not appear in the list of fields.

    In the JS Debugger, your proposed watch returns - 1, and

    getField("XYZ").valueAsString returns the default string that has been put in

    the field of the same name before it is deleted.

    That all means that the field is certainly in the form, but not on any

    page. Guess what? The form has a hidden page template! I think so

    the field is still in the model and that's the problem.

    Great! I made my changes in shape before programming the

    model. Silly me! Thank you very much.

    David

  • Multiple tables with the same field name

    Hi, I have a query that pulls a field named 'Total' from 20 different tables (week1 - semaine20). When I try to view the results as #Week1.Total #, for example, I get an error saying that Total is not defined in week1. I also tried totalHours.Week1.Total (totalHours is the name of my request), but get the same thing - Week1.Total is not defined in totalHours. Help, please! Thank you!

    Alias your colunms...

    SELECT
    request.ID, request. FirstName, request. LastName,
    Request.SEM, request.year, request.banner,
    Week1.id AS wk1_ID, Week1.Total AS wk1_total,
    Week2.id AS wk2_ID, Week2.Total AS wk2_total,
    Week3.id AS wk3_ID, Week3.Total AS wk3_total,
    Week4.id AS wk4_ID AS Week4.Total wk4_total...
    ... etc.

    They will now have different names in the output. (The table name prefix that is used in your query on each column is never displayed in the output.)

    Phil

  • Direct access to the form fields in the process?

    HI -.

    I am building an Apex application that has a section of form, I need to generate manually - I need a lot of Javascript custom treatment within this block of fields (generating an arbitrary number of fields based on other user input, update totals the user to change values, etc.). I have no problem to build that portion of the application.

    However, I am now not sure how to access the fields I create in a post submit processes (so I can process/save the data entered). Y at - it has a syntax that I use in the process through a list/collection of all submitted fields, or (b) directly access the value of the field named "xyz"?

    Thank you

    If you mean spit your own tags to entry with htp.p, you can do that in the APEX. You must use the APEX_ITEM package. When you submit the form, you will get an error because the procedure of wwv_flow.accept is not the settings that correspond to the fields in your form.

    Tyler Muth
    http://tylermuth.WordPress.com
    [Oracle security application: development of secure database and Middleware environments | http://sn.im/aos.book]

  • How to make querys with the table field names by ': ' in the

    Hello

    When I write a SQL query for a set of data in the BI Publisher I can't make queries containing fields with ":" in the

    as this left join - how can I say BI publisher is not to treat the field "SEQ_UDSTATUS:" as a parameter?


    LEFT JOIN [SDE]._SMDBA_._UDSTATUS_ tblStatus on tblIncident. "" SEQ_UDSTATUS: "= tblStatus.SEQUENCE

    If the report query is based on DB directly, better to use a view

    SQL query is perfectly valid, but BEEP does not allow it.

    No doubt you can trigger an SR to Oracle, they might take it as an improvement.

  • access to the last field in the form of tables

    I have a tabular presentation.
    We got into it.

    What is the code to access the last element of the tabular presentation and go to the next record (I want to add a new record in there).

    Hello

    To write

    GO_BLOCK('');
    LAST_RECORD;
    NEXT_RECORD;
    

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • Add the merge fields in the url

    We would like to dynamically add the id to contact SFDC email recipient (which is an existing merge Eloqua field) in the query string of a url in an e-mail message to follow the results of the survey through zoomerang. (for example www.zoomerang.com/survey/aa3w4roafadfos?contactid=#sfdccontactid# where sfdccontactid is the merged field.

    If anyone has experience doing this, please tell us where we try to send this email shortly.

    Thank you

    Joel

    Hi Joel,

    Merger of field, you can generate the HTML code required for the merger of field uttering one in your email and then merge in the email your work with.  Discover the grab HTML HTML field merging and post it in your URL.  Commonly, the syntax would be 'SFDC_ContactID1' or something of the sort (this is depends on the merge field name). In your particular case, the finished HTML code would look like, "SFDC_ContactID1">."

    -Erik Hertzman

  • to find the real domain name

    Hello

    How to find the real field name in the table in the form of erp


    for example, there is a field EST_QTY
    When I check the history, he said that this field belongs to table XXNP_OPN_JOBLOG_EST_002

    When I check the table I can't find a column named EST_QTY


    kindly help

    Hello

    To be sure which is the column in the table that is linked to a form field, you need to open the form, make sure the block is source of table and the column bound to the field. In case you don't have a form generator, usually a good guess is to check if there is a column with the same name as the field in the table contained in the history of recording (what you did). If this fails, there may be a column with a name that is similar as ESTIMATED_QTY or EST_QUANTITY.

    But sometimes the screen field is not shot a column of the table/view (for example, if it is a calculation based on the other fields). In this case, you must open the form to know how it is filled.

    It will be useful.

  • Same field name in the superclass and subclass

    Hello

    I would like to know what the effect is when you have two fields with the same name in a superclass and subclass. Something along the lines of:
    class Base
    {
       int x = 0;
    }
    
    class Derived extends Base
    {
       int x = 1;
    }
    If I store a reference to an object derived in a variable called base Base reference and I do base.x I get 0.
    If I store the reference in a variable of reference Derived called der and I do der.x I get 1.
    Are there in fact two fields with the name of x in the case of Derived?

    Thank you.

    Published by: 953012 on March 24, 2013 16:32

    Published by: 953012 on March 24, 2013 16:33

    And once more, you need to see the Java language specification. It answers questions such as yours and examples. See the examples.
    http://docs.Oracle.com/javase/specs/JLS/SE7/HTML/JLS-8.html#d5e10238
    >
    Example 8.3.1.1 - 3. Hiding of Instance Variables
    . . .

    because the declaration of x in the class Test hides the definition of x in the Point class, so class Test does not inherit the field x from its superclass Point. It should be noted, however, that if the field x of class Point is not inherited from the Test class, it is nevertheless implemented by instances of the Test class. In other words, each instance of class Test contains two fields, one of type int and one of type double. The two fields are named x, but in the declaration of class Test, the name of simple x always refers to the field declared in the test Code class in the instance of Test methods may refer to the instance variable x of class Point as super.x.

    Code that uses a field access x field access expression will access the field named x in the class indicated by the type of the expression to reference. Thus, the expression sample.x accesses a value of type double, the instance reported in the Test class, variable type variable sample is a Test, but the expression ((Point) sample) .x accesses an int value, the instance variable declared in class Point, because of the cast to type Point.
    >
    Have you seen this part? "each instance of class Test contains two fields, one of type int and one of type double.

  • Use the Edittext text as layer name?

    I build my own window prompt() for a script, but may not know how to use the text in the text field.

    What I want to do is to use the text as the name of the layer.


    Is there an input method or something I can use for this?



    Prompt() custom;


    var promptWin is new window ('dialogue', 'Pre dial the name');.

    var promptInputGroup = promptWin.add ('group');

    promptInputGroup.add ('statictext', undefined, ' name: ');

    var textFiled = promptInputGroup.add ('edittext', undefined, 'Demo');

    textFiled.characters = 20;

    textFiled.active = true;

    var groupTwo = promptWin.add ('group', undefined, "GroupTwo");

    groupTwo.orientation = "row";

    var okDialog = groupTwo.add ("button", undefined, "OK");

    var cancelDialog = groupTwo.add ("button", undefined, "Cancel");

    groupTwo.alignment = 'right ';

    promptWin.show ();

    Quentin

    Should be as simple as the definition of an onClick for button okDialog send the value to a variable or use the value immediately.

    var myVal;

    okDialog.onClick = function() {}

    myVal = textFiled.text;

    }

    You can also define an onChanging rather than the value to be sent in real-time as the user types. With each character typed, it would save everything right to your variable. I have to be careful though as malicious code could also quickly being sent to your script, depending on how you manage data the user enters.

    okDialog.onChanging = function() {}

    myVal = textFiled.text;

    }

  • Access to the fields of a form through the IAC

    Hi all!

    I created with Adobe LiveCycle Designer ES2 (provided with Adobe Acrobat Pro X) an example of a form with several fields.

    After that, I wanted to access the fields with capabilities of Communication monitor (IAC) of the Acrobat SDK using OLE.

    I chose as the .NET framework c# programming language. But the only field that I could access has been the field of signature and only when it was signed. I couldn't know the error. My code is wrong? Or is the form created fake? If anyone can help?

    The code I used:

    Acrobat.AcroApp app = null;
    Acrobat.AcroAVDoc avdoc;
    
    AFORMAUTLib.AFormApp formApp;
    
    AFORMAUTLib.IFields fields;
    
    app = new Acrobat.AcroApp();
    avdoc = new Acrobat.AcroAVDocClass();avdoc.Open(@"Form.pdf", null);
    formApp = new AFORMAUTLib.AFormApp();
    
    fields = formApp.Fields;
    

    int fieldsCount = fields.Count;
    foreach (var item in fields)
    {
      AFORMAUTLib.IField field = (AFORMAUTLib.IField)item;

    result = field. Name + '=' + field. "Value + " [" + field."] Type + "]";

    }
    

    Hello

    My understanding is that the AFormApp object can only be used to manipulate (fields created in Acrobat) AcroForm fields that you use LiveCycle Designer you create an XFA form.

    Depending on what you are wanting to do, you may be able to use the JSObject and therefore to call JavaScript from your application to achieve your goal.

    If you could provide more information on what you are trying to reach, then we may be able to guide you to a solution

    Concerning

    Malcolm

  • When I click on an address, instead of the name of domain appearing in the url field, only the IP address appears. How can I get the real domain to pop?

    When I click on an address, instead of the name of domain appearing in the url field, only the IP address appears. How can I get the real domain to pop?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

    You can attach a screenshot?

    Use a type of compressed as PNG or JPG image to save the screenshot and make sure that you do not exceed the maximum file size (1 MB).

Maybe you are looking for