Passing the value to the function clears the default value of the textBox before onClick

I created a 'clearTextBox()' function so that when an edittext obj is clicked in the default text disappears. He works until I try to spend the 'default' text in the service, to which cases it erases the text without the onClick. See: "textBox.line01.onClick = clearTextBox (textBox.line01, defaultText01);"

myGUI (this);

function myGUI (thisObj) {}

var myGUIPalette = myGUI_buildUI (thisObj);

function myGUI_buildUI (thisObj) {}

var myPanel = (thisObj instanceof Panel)? thisObj: new window ("palette", "user input panel', undefined, {resizable: true}");

{//Build GUI

res = "group {orientation:"column",-}".

titleGroup: group {orientation: 'row', \}

myStaticText: StaticText {text: 'Handset team word interludes'}, \

},\

textLineGroup: Panel {orientation: "column,"------}

line01: EditText {text: 'Enter the text line 01'}, \

line02: EditText {text: 'Enter line 02 Text'}, \

line03: EditText {text: 'Enter line 03 Text'}, \

},\

'ButtonGroup': group {orientation: 'row', \}

clearButton: button {text: 'Clear'}, \

renderButton: button {text: 'Making'}, \

},\

}";

}

myPanel.grp = myPanel.add (res);

Default values

//TextBox settings

var defaultText01 = "enter the text of the line 01 ';

var defaultText02 = "enter the text of the line 02."

var defaultText03 = "enter line 03 Text."

var myPanel.grp.textLineGroup = textBox;

textBox.line01.text = defaultText01;

textBox.line01.onClick = clearTextBox (textBox.line01, defaultText01);

function clearTextBox (activeTextBox, defaultText) {}

if(activeTextBox.Text == DefaultText) {}

activeTextBox.text = "";

}

}

Return myPanel;

}

If ((myGUIPalette! = null) & & (myGUIPalette instanceof window)) {}

myGUIPalette.center ();

myGUIPalette.show ();

}

}

Hi sbaden04.

Your syntax does not work, since the textBox.line01.onClick = clearTextBox (textBox.line01, defaultText01); entitled to textBox.line01.onClick the result of the right side, which is not a function, but undefined. You can try this way:

textBox.line01.onClick = function() {clearTextBox (textBox.line01, defaultText01) ;};}

Or like this:

textBox.line01.properties = {defaultText: defaultText01};

textBox.line01.text = defaultText01;

textBox.line01.onClick = plain text;

function clearText() {if (this.text = this.properties.defaultText) this.text ="" ;};}

Xavier.

Tags: After Effects

Similar Questions

  • By passing the quick values of dashboard as input for a function

    Hello world

    I would like to pass quick values of dashboard as parameters in a function as described below, but I'm a little hesitant how to proceed.

    In the physical layer, I defined a table in a select statement - something like:

    Select a, b, c
    table (minutevals.get_minute_vals (para1, para2, para3)

    minutevals is a stored procedure
    get_minute_vals is the stored inside on a function procedure
    Para1... para3 are input to the function parameters.

    Right now (for testing) para values are hardcoded.

    How can I pass values to a quick dashboard in the para1, para2 or para 3?
    Is it possible to define (editable by the user) session variables to receive the quick selection of dashboard
    and then use these session variables as the para1... para 3 values?
    If so - how can I do for session variables in the function parameters (use to evaluate?)?

    Thanks for your help

    concerning
    Andy

    See this link which will be useful

    Variable passage of presentation to the physical layer in SPR

    Thank you
    Vino

  • How to pass the value of the item Application Javascript function.

    Hello

    I have the JavaScript in the properties attribute of the HTML Form element

    I'm on page 1 and passing the value of the item page P1_DEPT_NO. It is perferctly working very well and I am able to get the exact value of the element on the page
    onchange="javascript:function1($x('P1_DEPT_NO').value);"
    I'm on page 1 and passing the value G_DEPT_NO of the Application element .
    The problem here is, I don't get the point of Application inside the javascript function value.
    I tried to use alert(); and it gives me the undefined value
    onchange="javascript:function1($x('G_DEPT_NO').value);"
    I just want to know, How to pass the value of the Application in Javascript element.

    Thank you
    Deepak

    Deepak,

    I'm not a Javascript expert, but the suggestin I did was because the javascript is a case-sensitive... language and thats why onChange is not the same thing as onchange.
    Not sure if this is causing the problem.

    Application elements not associated with a page and have therefore no properties user interface.
    So, as mentioned in another post, the rendering would not work for the elements of the application.
    If it is for a single item, used only on this page, you might create a hidden page element and use it fo your goal

    If you want to keep watching objects application and AJAX, this page contains examples of using AJAX to solve problems like the one you mentioned.
    http://www.Oracle.com/technology/OBE/hol08/apexweb20/ajax_otn.htm#T1B

    Thank you
    Rajesh.

  • How to pass the parameters or values film double hollow?

    Hello

    I create a game in Flash 8 with 2 AS and I have some questions to ask.

    First of all, I'm stuck for 2 days to create a tower Laser beam to the target.

    I searched the internet for solutions but I can't really find one, so I'll try display of questions myself...

    First I tried to create, and the effectHolder in which each laser beam has been created, because it seems I can create only one line in each movieClip...

    _root.duplicateMovie(effectHolder_mc , "effectHolder_" + this, _root.getNextHighestDepth());
    v = a = _root["effectHolder_" + this];
    ray.onEnterFrame = function()
    {
    v.clear();
    v.lineStyle(1,0xFF0000,100);
    v.moveTo(this._x, this._y);
    v.lineTo(creep._x , creep._y);
    v.text = "True"

    }

    It's triggered eveytime, she was a target.

    With each turn that triggered a laser that I created, it became more than offset, so I tried selfdestructing after some time.

    this._alpha -= 10;

    if (this._alpha <= 0)

    {

         this.removeMovieClip();

    }

    But he did not actually work, so I tried another solution. I tried to give each MovieClip ("Laser"), duplicate code that creates the laser beam.

    onClipEvent(load)
    {
         this.fx = from._x;
         this.fy = from._y;
         this.tx = to._x;
         this.ty = to._y;
    }
    onClipEvent(enterframe)
    {
         _root.dmg.text = "From: " + fx + "," + fy + " To: " + tx + "," + ty; //I used this on a textbox to see if parameters are transmited. But they were all 'undefined'

            this.clear();
         this.lineStyle(1,0xFF0000,100);
         this.moveTo(from._x, from._y);
         this.lineTo(to._x , to._y);

         this._alpha -= 4;
         if (this._alpha <= 0)
         {
              this.removeMovieClip();
         }
                                 
    }

    The problem is that I did not know how to pass the coordinates of the tower and the target to the MovieClip so that it knows where to create the line.

    X++;
    duplicateMovieClip(_root.Laser, "Laser" + X, X,{from._x,from._y,to._x,to._y});         
    g = _root[_root.Laser + X];
    g.fx = from._x;
    g.fy = from._y;
    g.tx = to._x;
    g.ty = to._y;

    Please leave suggestions on how to send the parameters or values for the created clip, or an idea of the creation of this line ("beam") for each tower, without so much trolling.

    Thank you

    Chris

    What is the trigger of v's _alpha decrease?

  • Waterfalls by passing the value between QML

    Hi, I have the main.qml with a display list, on, click on any element of the display of the list, I want to pass the value to another QML which is a leaf to change or remove, I followed what is on the tutorial to use the alias property to the second page to set the alias for the fields that I want to access another page and have the main.qml to create the object in the worksheet and assign value and open. Right now, it's say those alias not found. Here is the excerpt code sheet QML import bb.cascades 1.0 sheet {id: content newEventSheet: Page {id: addEventPage... eventNameText.text = ' '; eventTimePicker.value = eventTimePicker.dateFromTime("00:00:00"); newEventSheet.close (); mainObj.addData (eventName, selectedHour, selectedMinute, selectedSecond);}} Container}}} {layout: StackLayout {orientation: LayoutOrientation.TopToBottom} container {container {layout: StackLayout {orientation: LayoutOrientation.LeftToRight} leftPadding: 20.0 topPadding: 50.0 bottomPadding: 50.0 Label {text: preferredWidth 'Event name': 200.0} TextField {property alias txtEventName: eventNameText id: eventNameText hintText: preferredWidth 'Enter event name': 500.0}} container {layout: StackLayout {orientation: LayoutOrientation.LeftToRight} leftPadding: 20.0 Label {text: preferredWidth "Event time": 200.0} DateTimePicker {property alias pickEventTime}}} {{: eventTimePicker id: eventTimePicker mode: DateTimePickerMode.Timer minuteInterval: 1 preferredWidth: 500.0 onValueChanged: {}}} hand QML Container {id: eventListContainer ListView {id: eventList dataModel: eventsModel / / use a ListItemComponent to customize the appearance of the list function itemType view (data, row) {console.log ("Calling itemType:" + row);}}} return "item"; return (indexPath.length == 1? ("head": "item"); } listItemComponents: [ListItemComponent {type: 'the point' StandardListItem {title: "event:"+ ListItemData.EventName; "}}] Description: "time:" + ListItemData.EventHour + ":" + ListItemData.EventMinute + ":" + ListItemData.EventSecond ;}}] "." onTriggered: {console.log ("Calling onTriggered:" + row);} var selectedEvent = dataModel.data (row); var eventDetailPage = eventDetailDefinition.createObject (); eventDetailPage.txtEventName.text = selectedEvent ['EventName']; eventDetailPage.pickEventTime.value = picker.dateFromTime(selectedEvent["EventHour"]+":"+selectedEvent["EventMinute"]+":"+selectedEvent["EventSecond"]); eventDetailPage.open (); }} the device connect by default to the 14:44:50.432 com.example.IntervalTimer1.testDev_ervalTimer1a7a2c2e2.11214974 may 28 9000 REVIEWS asset:///main.qml:122: TypeError: result of expression 'eventDetailPage.txtEventName' [undefined] is not an object. Can someone help me? Thank you

    Have you tried to put the alias property in the root of the sheet in the TextField?

  • Passing the value of the SQL query select list

    Hello

    In my application users have in their homepage to a region which has two simple things, a part of LIST SLECT lov function and a BUTTON

    There is also another page which has a normal life to report which shows the employees.


    Homepage the user can select certain number of Department in its 'SLECT-LIST' and click 'open '.


    For example: If the user has selected a DEP_NUM_5 and click on the BUTTON it will be redirected to the page of a report and gets only showed the employees belonging to the Department 5.


    The report page contains a simple SQL query, and I understand that somehow I must pass the value in the SELECT LIST, where I now have the '?


    How can I do this, where should I start?

    Of course I would really appreciate an example of code, if anyone has time to do a.

    
    select "EMP_ID", 
    "EMP_FORNAME",
    "EMP_SURNAME",
    "DEP_NUMBER"
    from EMP E
    where E.DEP_NUMBER = ????????
    
    

    Hi Sozua,

    1. create an item hidden on the page where you have the report.

    I say P2_DEPT_NO

    2 assign to that in your sql query

    select "EMP_ID",
        "EMP_FORNAME",
        "EMP_SURNAME",
        "DEP_NUMBER"
        from EMP E
        where E.DEP_NUMBER = :P2_DEPT_NO
    

    below the area source ther is also an option

    Elements of page to submit-> put this element in this.

    for example;

    Page to submit items: P2_DEPT_NO

    3. change your button

    Action: Redirecting to page of this application

    Page: 2 / / assuming that page 2 is the report page

    Place these items: P2_DEPT_NO

    with these values: & P1_SELECT_LIST.  assuming that selection list is on page 1

    Hope this helps you,

    Kind regards

    Jitendra

  • Passing the value of the where clause with the page

    Dear friends,

    I have a requirement like when I select a selection list value I should pass this value to sql query where clause without submitting the page

    ex I have a select like: P1_Dept guess I selects the value 10 in this

    then I have a query select * from emp where deptno =: P1_Dept.

    DB. ORACLE 11G

    APEX 4.1.1.00.23

    is this possible? can someone help me please in this topic

    Thanks and greetings

    Vballeda

    Suppose we have the selection list with the name P1_DEPT and query for report

    select * from emp where deptno = :P1_DEPT
    

    We create dynamic Action on the evolution of the P1_DEPT point. We will need two real actions:

    1-> set value action

    Set the Type - > body of the PL/SQL function

    The function of body - > return 1;

    Page item to submit-> P1_DEPT

    Change to delete-> Yes event

    Selecttion Type-> trigger element

    2. action-> Refresh

    Selecttion Type-> region

    Region-> your region of report

  • Pass the value to the process of request through javascript

    Hey everybody,

    I am currently struggling with the call to an application process and passing a value to it through javascript. Ideally, my javascript is triggered by a dynamic action, which itself is triggered when a user changes the value of a selection list. Below is the javascript code that is relevant:

    for (k=0; k<active_array.length; k++){
          var request = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=CAL_COLORS', 0);
          request.add('x01', check_array[j]);
           var ajaxResult = ajax.get();
           alert(ajaxResult);
          active_array[k].parentNode.style.backgroundColor=document.getElementById('P14_TEST_COLOR').value;}
    

    And she calls the application process is also shown below:

    declare
    v_color varchar2(20);
    begin
    select color into v_color from cal_colors where other_user = apex_application.g_x01 and user_id = :USER_ID;
    :P14_TEST_COLOR := v_color
    end;
    

    The issue seems to be that online 03 my JavaScript, especially since my array element is not spent properly in my process. In an attempt to debug this, I added the alert message, however, instead of any relevant information, the alert shows just the HTML page! I'm at a loss as to what I'm doing wrong here, so if anyone has any input, I would very much appreciate it.

    Basically, you need to rewrite in the http buffer, using htp.p:

    DECLARE
      v_color VARCHAR2(20);
    BEGIN
      SELECT color
        INTO v_color
        FROM cal_colors
       WHERE other_user = apex_application.g_x01
         AND user_id = :USER_ID;
    
      htp.p(v_color);
    EXCEPTION WHEN no_data_found THEN
      htp.p('white');
    END;
    

    You could potentially make it much more efficient also. At the present time you loop on what is probably an array of elements, so from a tabular form probably. Rather than call an ajax for each line, you can group together them and make a call.

    Example:

    JS, you can use this to create an array with values to be placed on the server:

    var lArray = [];
    $("input[name=f03]").each(function(){
    lArray.push($(this).val());
    });
    

    And you can use the apex.server.process api to call a process on demand:

    apex.server.process("MYPROCESS", {f01: lArray}, {success: function(pData){console.log(pData);}})
    

    As you can see, the table with the values is put in the table in the f01. You must use the option of success well since it will be asynchronous (htmldb_Get.get is a synchronous call).

    With respect to the CLASS code:

    DECLARE
      l_return VARCHAR2(4000);
    BEGIN
      FOR i IN 1..apex_application.g_f01.count
      LOOP
        l_return := l_return || '"VALUE' || i || '",';
      END LOOP;
    
      l_return := RTRIM(l_return, ',');
      IF l_return IS NOT NULL THEN
        l_return := '[' || l_return || ']';
      END IF;
    
      htp.p(l_return);
    END;
    

    It will loop through the items in the table-f01 and build a new JSON notation and write it back to the http buffer so it returns to the client. It will look like this:

    ["VALUE1", "VALUE2", "VALUE3", "VALUE4", "VALUE5", "VALUE6", "VALUE7", "VALUE8", "VALUE9", "VALUE10"]
    

    I say this because when users use your application, you do not want such a quantity of calls. A single call by treatment action would save a lot of resources. You may have to loop twice on your items to apply your backgroundcolor, but I don't voluntarily not too mention jQuery since you is perhaps not familiar with it and get scared by him.

  • Dynamically by passing the values in the columns

    Hi all

    I'm trying a pl/sql block that take a string and execute it dynamically. Suppose that here is the string

    M_COL: = Q' [(Code_P = > ': DEPTNO', P_CODE_TYPE = > "ÉTAT")]';

    Now try to run. using below

    M_STR: = 'SELECT CHK_DEPT ' | M_COL | ' FROM EMP WHERE EMPNO = "7499" ';


    RUN IMMEDIATELY M_STR

    IN M_DATE;

    Now what I want is M_STR vairable executed as

    SELECT CHK_DEPT (Code_P = > DEPTNO, P_CODE_TYPE = > 'STATE') FROM EMP WHERE EMPNO = '7499'

    Instead of

    SELECT CHK_DEPT (Code_P = > 'DEPTNO', P_CODE_TYPE = > 'STATE') FROM EMP WHERE EMPNO = '7499'

    another other way in the Code_P column DEPTNO value parameter must be passed. Also note that the DEPTNO column in the M_COL string is Dynamic.i.e

    M_COL: = Q' [(Code_P = > ': DEPTID', P_CODE_TYPE = > "ÉTAT")]'; OR

    M_COL: = Q' [(Code_P = > ': EMP_ID', P_CODE_TYPE = > "ÉTAT")]';

    Any suggestions, please share with me.

    And also, please don't bother much about the data and the output of function. If I get a way to pass the value of the column in function, my problem is solved.

  • Passing the record in function type [error: identifier must be declared]

    Hello
    I have a record defined in my procedure type
    type chk_tab is (record
    effective date,
    County number (9)
    )

    type chk_typ is table of chk_tab of binary integer index;
    chk_typ_rec chk_typ;

    I have to pass another function of the effect and the County, tried doin as below:
    function name: func_chk_typ

    func_chk_typ (effect, count);

    This property returns a saying "identifier effect must be reported.

    I need to pass those values to registration in the service type, how more of this coming?
    Any help is appreciated.

    Hi Camilla,

    Find code below.

    The function code:

    CREATE OR REPLACE FUNCTION fetch_band(eff in date,ineff in date)
    return number
    is
    
      lu_cb_sysid  NUMBER;
    
    BEGIN
    
    select fk_cb_sysid
    into lu_cb_sysid
    from ia_for_icon
    where cr_ans_date >= eff
    and cr_ans_date < ineff;
    
    RETURN lu_cb_sysid;
    
    END fetch_band;
    

    Code of procedure. Here, I joined the service.

    CREATE OR REPLACE procedure abc(a varchar, b number) is
      type cns_tab_record is record(
        eff   date,
        ineff date);
    
      type cns_tab_typ is table of cns_tab_record index by binary_integer;
    
      cns_tab cns_tab_typ;
    
      v_lu_cb_sysid NUMBER;
    
    BEGIN  
    
      -- Here you have to assign the values to your table type record.
      -- For example I am passing two values SYSDATE and SYSDATE - 10
    
      cns_tab(1).eff := SYSDATE;
      cns_tab(1).ineff := SYSDATE - 10;
    
      v_lu_cb_sysid:= fetch_band(cns_tab(1).eff, cns_tab(1).ineff);
    
    END abc;
    

    But I wonder why you use the data type here table type.

    Hope code above will help you.

    Thank you
    Suri

  • Insert or update trigger by passing the value to the stored procedure

    My task is to write a trigger that will pass a value for an insert or update to a stored procedure.

    It's Friday and I am not clear thinking, forgive me...


    Create or replace trigger < name of the trigger >

    After you insert or update table XXX
    for each line


    Run the Just_Do_It procedure
    (userid = new.user_id).


    If the table XXX has the userid column, and I want the trigger to get it and send it to Just_Do_It.
    what Miss me?

    Thank you.
    CREATE OR REPLACE TRIGGER trigger_name
      AFTER INSERT OR UPDATE ON table_name
      FOR EACH ROW
    BEGIN
      just_do_it( :new.user_id );
    END;
    

    Justin

  • Call AJAX process and pass the value on request

    Hello
    I want to call a process on demand by a button. So I added the following for her javascript code:


    function update_bp1()
    {
    Alert ('hhhhi');
    Alert (document.getElementById('P11_PATIENTID').value);
    var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is update_bp', 0);
    ajaxRequest.add ('patient_id1', document.getElementById('P11_PATIENTID').value);
    ajaxResult = ajaxRequest.get ();
    Alert (ajaxResult);
    }
    < /script >


    The called application process is:

    declare
    number of v_id;
    number of v_visitno;
    v_patientid varchar2 (10);
    BEGIN

    Select max (id), max (VISITNO)
    in v_id, v_visitno
    of TBL_PATIENT
    where PATIENTID =: patient_id1;

    Update TBL_PATIENT
    the SYSTOLIC value = 10,
    DIASTOLIC = 20
    where id = v_id
    and visitno = v_visitno
    and patientid =: patient_id1;

    commit;

    HTP. PRN ('process value'-|: patient_id1);

    end;

    It seems there is error in the ajaxrequest.add clause, as after commenting on the function is executed. Alert print correctly the value P11_PATIENTID.
    The alert of the ajaxresult gives the complete HTML code and the process is not running. How interpreet ajaxresult error.

    Please help me to identify the problem.

    Thank you

    Hello

    I think that it is not relative browser, but Firefox with the module Firebug is just a better tool for web developer.
    It is easier to debug problems you have now.

    Is the point of application patient_id1? You need also to pass the value to the application process?
    If you don't need it another vise, it is better to use variables global apex_application

    Try this
    JavaScript for HTML page header

    
    

    Then, create the new process On demand application named UPDATE_PATIENT. Please note that the name of this process is case sensitive.

    DECLARE
      v_id        NUMBER;
      v_visitno   NUMBER;
      v_patientid VARCHAR2(10);
      v_count     NUMBER;
    BEGIN
      SELECT MAX(id),
        MAX(visitno)
      INTO v_id,
        v_visitno
      FROM tbl_patient
      WHERE patientid = apex_application.g_x01
      ;
      UPDATE tbl_patient
      SET systolic  = 10,
        diastolic   = 20
      WHERE id      = v_id
      AND visitno   = v_visitno
      AND patientid = apex_application.g_x01
      ;
      v_count := SQL%ROWCOUNT;
      COMMIT;
      htp.prn(v_count || ' rows updated');
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
      htp.prn('error: patientid ' || apex_application.g_x01 || ' not exists in tbl_patient');
    WHEN OTHERS THEN
      htp.prn('error: ' || sqlerrm);
    END;
    

    Kind regards
    Jari

  • Who knows how to pass a value from the form on the next page of javascript?

    I have a simple drop-down list. Maybe this isn't the best way, but I use the MM_goToURL function on the onchange event. It works very well so he can redirect without clicking on the submit button.
    What I need to do, it's pass the value selected on the next page and grab it so I can use Coldfusion to manipulate the results.

    Help, please.

    The answer is too simple. Just use javascript to submit the form onchange.



  • Miss me the function clear history in the history menu Firefox

    I am currently using Firefox 21. Since the 19th, the function 'clear history' in the menu history Firefox disappeared. So no way click on it and clear the history you like, last time... or everything. I've uninstalled and reinstalled the browser several times without change. Only way to clear the history is by manually deleting on the left side of the window after doing Ctrl + h is it possible to set the browser?

    Do you clear recent history in the menu background?

  • When I opened the window "save the Page under", the drop-down box file name indicates the files that have been saved a long time ago. It is not cleared by a function 'clear history' that I can find. How can I erase this?

    1. Question

    When I opened the window "save the Page under", the drop-down box file name indicates the files that have been saved a long time ago. It is not cleared by a function 'clear history' that I can find. How can I erase this?

    Hello.

    I think this is a related issue of Windows, because it is the Manager to save the windows file that we are talking about here (right?). You should contact Microsoft for help with this one, I think. You expect to be able to delete entries simply by touching delete on your keyboard when they are concentrated (that is how it goes for the removal of the form entries specific autocomplete in Firefox), but I have not tried.

    I'm sorry I can't be more helpful.

Maybe you are looking for