Dynamic action - text - ALERT

I created a dynamic Action for the ALERT and in the 'text', I want to display a page Variable value. I typed in &. P1_X and the value is displayed with a null value. I checked that there is some value in P1_X such that is displayed on the Page.

Ajay

Hello

create action type "Run JavaScript Code"

Enter the following in the Code

Alert (document.getElementById("P1_X").value);

Concerning

Salim

Tags: Database

Similar Questions

  • Can a dynamic action of type 'alert' display a value of field without javascript?

    Hello

    can a dynamic action of type 'alert' display a value of field without javascript ( alert ( $x (P '200_OP').value)); ?

    What should I write in the 'text' section to display in the alert, the value of P200_OP for example?

    Gianpaolo cordially

    Hi gianpagi,

    gianpagi wrote:

    I know that with "run JavaScript Code" works. My question is about action as 'alert '.

    Dynamic action "Alert" is expected to this only the string to display in the alert. May not be able to access the current value set in a page element.

    Therefore, "Run the Code JavaScript" only works in this case where your can integrate the current values of the DOM html elements

    If you notice that da 'Alert' request 'Text' and 'Execute JavaScript Code' DA 'Code' request to be executed.

    Kind regards

    Kiran

  • Dynamic action to execute PL/SQL that calls a JavaScript alert - does not

    Greetings,

    I'm stuck!  I use the Apex Version 4.2.2.  I have a requirement that, when the user fills Field1, I check the database to see if the value of field1 has already been used.  If it was used, I have to inform the user, but the user is allowed to reuse the value - that is to say, duplicates are allowed.  My thought is to use a dynamic action to check the onchange of value running pl/sql to check (via a function in the database) and if it returns true, use a javascript alert to inform my user value is used.  They can then close the alert and change (or not change) the duplicate value

    I did the following:

    1 wrote a PL/SQL function in my utility package in the database - we'll call it apps.my_utils.check_value_use (p_my_val in varchar2) return Boolean - it works.

    2. created a dynamic Action with the following properties for P1_FIELD1:

    Event: change

    Selection type: item (s)

    Product (s): P1_FIELD1

    Condition: is not null

    3. the dynamic Action has an action - real Action

    Action: Execute the PL/SQL Code

    Page items to submit: P1_FIELD1

    PL/SQL code:

    BEGIN

    IF apps.my_utils.check_value_use(:P1_FIELD1) = TRUE THEN

    HTP.p ("< script type =" text/javascript "> '");

    HTP.p ("alert (" this value is used ""); ")

    ');

    HTP.p ("< /script >" ");

    END IF;

    END;

    When I run the page and fill in Field1 with a value that I know is in use, I get the following error:

    Error: parsererror - SyntaxError: JSON.parse: unexpected character

    Help, please.  I already spent too much time on this apparently simple requirement.

    Thank you

    J.

    BEGIN

    IF apps.my_utils.check_value_use(:P1_FIELD1) = TRUE THEN

    HTP.p(' ');

    END IF;

    END;

    Avoid doing this. Try the following method:

    (1) create a dummy hidden element to store the result of your validation of PL/SQL. Lets call it P1_DA_ERR

    (2) in your PL/SQL block put this point hidden in the field "Page point back.

    (3) in your PL/SQL block placed the result of your validation in this element hidden as

    DECLARE
    l_err PLS_INTEGER := 0;
    BEGIN
    -- An example
    IF 1=1 THEN
    l_err := 0;
    ELSE
    l_err := 1;
    end if;
    :P1_DA_ERR := l_err;
    END;
    

    (4) add a true other "Run Javascript code" type action. The could should look like:

    if(parseFloat($v('P1_DA_ERR'))==1)
    {
    alert('Error occurred');
    }
    
  • Failed to create a dynamic action ALERT to build a Select list when selecting a particular value.

    Hi everyone, this should be so easy, and yet I'm stuck.

    I have a form with a P110_VESSEL_ID element.   This article is a list of selection.   It is based on the query:

    Select distinct v.vessel_name, v.vessel_id

    of ships v, frequent_fishermen ff

    where ff.dea_permit_id =: G_PERMIT_ID and

    FF:vessel_id = v.vessel_id

    UNION

    Select v.vessel_name, v.vessel_id

    of apex_collections v, vessels

    where collection_name = "SUPVES_COLLECTION" and

    a.C002 = v.vessel_id

    If the user decides from the values in the selection list query, they can opt to SELECT all THE VALUES.  This SELECT all VALUES is a TEXT of ITEM POST on P110_VESSEL_ID.

    < a id = "popVessels" href = "#" > < font color = blue > select all < /a > ships

    It all works very well.

    The problem is that when the user selects a boat name = "UNKNOWN" and it is corresponding to the value of vessel_id, I want an ALERT to appear indicating that they should check that the boat is UNKNOWN and no one's any ship.

    I created a dynamic action

    event = change

    Select type = item

    Item = P110_VESSEL_ID

    Real ACtion #1 is the ALERT.

    Currently, I have no other logic, but can't even get this working.  All thoughts.   I also tried the SELECT TYPE = jQuery Selector = select [name = "P110_VESSEL_ID"], but that does not work either (although I am not sure if the value must be P110_VESSEL_ID or static VESSEL_ID name).

    Any help is appreciated.

    PS. the page is not submitted when the ship is changed.  There are other data that should be in this region and others and many validations run when submit to submit would not be an option.

    Thanks again,

    Karen

    Is (BOAT = UNKNOWN) a single value with a single vessel_id? If Yes and for example if the vessel_id is 99, then proceed as follows:

    Add an expression "JavaScript" in your dynamic action.

    In the Condition value, enter:

    this.triggeringElement.value == "99"
    

    -Jeff

    And I agree with Nicolette, there is something wrong with some other DA who is at the origin of the DAs after that does not work.

  • Dynamic action - compare the elements in Date - Show Alert

    This is my first attempt to create a dynamic Action. I am creating a dynamic Action that displays an alert if a user enters a date in an article in date picker (P1_DATE1), which is less then another date in a different element (P1_DATE2).

    Event = change
    Select Type = item (s)
    product (s) = P1_DATE1
    Condition = less than
    Value = <? >

    If the condition is true, it must trigger an action type 'alert '. The alert text should read something like "Date1 precedes Date2.

    I'm not sure what syntax to use in the value element. It seems not that I element values in the element of reference value.


    How can I create a dynamic Action that will assess if P1_DATE1 < P1_DATE2 when P1_DATE1 is changed and show a warning if this is true?

    Kind regards
    Todd

    Change the status of "javascript expression", and then assign the expression $v ('P1_DATE1')<$v('P1_DATE2'). then="" add="" a="" true="" action="" in="" which="" you="" do="" the="">

  • Use Dynamic Actions with pl/sql, calling a javascript alert function

    Hello

    I use Apex 4.0.1.00.03 with IE7.

    The problem I have is:

    I am converting an Oracle Forms application that has a lot of logic in it. In the application forms, it is a pl/sql function, based on a If/else condition call a popup alert box, which displays a warning message. He called pl/sql functions that return raising to the IF statement.

    Example of pl/sql code:

    If check_records() > 0 Then
    message to the alert box
    ElsIf TypeA_record then
    message to the alert box
    On the other
    message to the alert box
    End If;

    I need to replicate this functionality to the Apex 4. I tried to create dynamic Action on a page element, using a pl/sql function, however, when I call the popup javascript, this code not popup an alert box. I need the pl/sql to be run when the element of the page changes, not when the page is sent.

    The code I used to test the pl/sql code, which does not work in dynamic Actions > pl/sql is:

    Begin
    HTP.p ("< script type =" text/javascript"> '");
    HTP.p ("alert ("today runs javascript code!");"
    );
    HTP.p ("< /script >");
    End;

    I need to create a pl/sql function that can do alert areas based on an IF condition.

    Could someone point me in the right direction? Using dynamic shares the best way forward? I need to trigger on a page element, change the value.

    Works fine now.
    In the javascript code, I changed:

    get.addParam ('x 01', $v ('P105_PREP_TYPE'));

    by

    get.addParam ('x 01', $v ('P1_PREP_TYPE'));

    P1_PREP_TYPE is the correct name of the element.
    Now when I choose the OTHER, 1 message.

    Concerning

  • Tips: APEX 5 r IR by a dynamic action after the text fields complete

    Hello I hope I can get assistance on this matter and thank you in advance for any information.

    I have an APEX 5 screen, that has 4 fields of entry of text and under this one IR that has these 4 parameters in its SQL where clauses.

    Now if I create a button that submits page or redirects to this page my report can be updated with the values of user entered without problem, basic stuff.  If I create the settings section as a dialog box model once again that I can get the update report as this dialogue submits the page as well as the report can refresh according to closed dialog option.

    What I struggle to reach is to allow the user to enter values in the text fields click on a button called 'submit' and there all stages of implementing dynamic action without page reloading.  I want user to P1_A, P1_B, P1_C, P1_D press on "submit" input, dynamic action that links the values entered into the fields, then fire another dynamic action that updates the State when the button is clicked / modified values what works the best.

    I am struggling to get this to work and I even tried to copy these settings and do them as hidden for example bind input P1_A to P1_A_Hidden by a dynamic action and have the report where clause =: P1_A_HIDDEN, but have not managed to get this working.

    It's possible?  I know its easy to simply send the page and make it work, but I want the experience to be quite uniform for the user and act as you never leave the page.

    I saw on the packages of the app in the chart example.  The bubble chart has a list selector (salary) and the table updates dynamically, it seems so that the process can occur, but I need the user to enter text and not use selection lists.

    My apologies if I missed any, but I can give you more if it helps.

    Concerning

    1972903b-5166-494e-8355-08d9d4006e96 wrote:

    Hello I hope I can get assistance on this matter and thank you in advance for any information.

    I have an APEX 5 screen, that has 4 fields of entry of text and under this one IR that has these 4 parameters in its SQL where clauses.

    What I struggle to reach is to allow the user to enter values in the text fields click on a button called 'submit' and there all stages of implementing dynamic action without page reloading.  I want user to P1_A, P1_B, P1_C, P1_D press on "submit" input, dynamic action that links the values entered into the fields, then fire another dynamic action that updates the State when the button is clicked / modified values what works the best.

    The button simply trigger a unique dynamic action of refreshment on the IR region. Session state for page elements must be processed automatically by specifying them in the property Page to submit Items of the IR region.

    Please ensure that you have updated your forum profile with a recognizable username instead of "1972903b-5166-494e-8355-08d9d4006e96": Video tutorial how to change username available

  • In table form, a dynamic action to disable and set of columns of text

    Hello!!

    With the help of APEX 4.2.6 with Oracle 11 g R2, someone I work with has a tabular presentation of the need to do the following:

    Tables has the following provision:

    When the user selects the UOM LOV Dollars, the rate must have related associated text box the amount set to 1.  We currently have JavaScript disable and set the background color, but fo rth elife of me that I can seem to help set the value...

    The code we have in dynamic action:

    < tt >

    ROW_ID = $(this.triggeringElement).attr('id').substr (4);

    If (. val() $(this.triggeringElement) == 2)

    {

    $(«#f04_» + row_id) prop ('readOnly', 'readonly');

    $(«#f04_» + row_id) prop ("class", "textinputdisabled");

    .Val (1) $("#f04_" + row_id);  < = Here's where we had the question...

    }

    on the other

    {

    $(«#f04_» + row_id) prop ("readOnly", false);

    $(«#f04_» + row_id) prop ("class", false);

    < /tt >

    Thank you

    Tony Miller
    Los Alamos, NM

    Hi Tony

    What exactly is the problem here? I have no problem setting the value using the method described above. There is even a '1' in the screenshot above, no doubt, which indicates that the value has been successfully changed.

    For ease of improved management, I'd use traversal Dynamics for the form element affected, rather than hard-code the ID (or go with a DA conditional with distinct actions of true/false), but the jQuery code to set the value is the same:

    var uom, rate;
    
    uom = $(this.triggeringElement);
    rate = uom.closest('tr').find('td[headers="RATE"] input');
    
    if (uom.val() === "USD") {
      rate
        .prop("readOnly", true)
        .addClass("textinputdisabled")
        .val("1");
    }
    else {
      rate
        .prop("readOnly", false)
        .removeClass("textinputdisabled");
    }
    

    (I used a static LOV in the column of the unit of MEASURE, so the value of '$' is 'USD' rather than '2').

  • Dynamic action in Apex - automatic text field display based on the definition of value

    Hello

    I have two text elements. Need to create dynamic action for what follows,

    1 Order_number

    2 Order_type

    When a user enters an order number starting at 1, the order type should type should automatically posted as CONSUMER.


    When a user enters an order number starting with 2, the order type should type should be automatically displayed as COMPANY to another display null.

    Can anyone help please have solved this issue.

    Thanks in advance!

    Hi 2932464,

    2932464 wrote:

    Please change your login username of "2932464" to something meaningful. Reference: Video tutorial how to change username available

    I have two text elements. Need to create dynamic action for what follows,

    1 Order_number

    2 Order_type

    When a user enters an order number starting at 1, the order type should type should automatically posted as CONSUMER.

    When a user enters an order number starting with 2, the order type should type should be automatically displayed as COMPANY to another display null.

    Can anyone help please have solved this issue.

    Hereby you mean something like this: https://apex.oracle.com/pls/apex/f?p=52380:11:129938442406997:

    If Yes, then create dynamic action as follows:

    • Create a dynamic action on the Order_number change event say. P11_ORDER_NUMBER.
    • Event-> change, Type of selection-> item (s), article (s)--> P11_ORDER_NUMBER Condition-> is not null
    • Real Action-> to run the JavaScript Code
    • JavaScript code:
      var ordernum = $('#P11_ORDER_NUMBER').val();
      var startdigit = ordernum.substr(0,1);
      if (parseInt(startdigit) === 1) {
        $('#P11_ORDER_TYPE').val('CONSUMER');
      } else if (parseInt(startdigit) === 2) {
        $('#P11_ORDER_TYPE').val('BUSINESS');
      }
    

    I hope this helps!

    Kind regards

    Kiran

  • Dynamic Actions disable button based on the text field

    Hello

    Sorry if this has already been asked but I checked and could not find a job.

    «I'm trying to disable / enable a button "view" among the elements of this region from if a text field has a value or.»  I created a dynamic action for this but its not working only partially.  I can get the button to be disabled or enabled when I leave the text field, but what I'm trying to do is to get the State of button to change as soon as I start to type in the text field or return to people with disabilities if the text is deleted.

    I don't know that I'm missing something simple and help you can give is greatly appreciated.

    I use APEX 4.1 and that's how I got the dynamic action implementation, I tried different but no event types to give them action I want.

    I also install an example (details below)

    Event - change

    Selection type - point

    Article (s) - P1_TEXT

    Condition - is null

    Real Action

    Action - disable

    Fires when the result of the event is - real

    Fire on the loading of the Page - Y

    Items affected - button

    Article (s) - P1_BUTTON

    Action of false

    Action - Enable

    Fires when the result of the event is - fake

    Fire on the loading of the Page - Y

    Items affected - button

    Article (s) - P1_BUTTON

    workspace - show_issue

    user_name - show_issue

    password - show_issue

    app_id - 61707

    http://Apex.Oracle.com/pls/Apex/f?p=61707:1

    It works as expected if you change the event of 'Change' for 'key version?

  • IE10: Dynamic Action failed when using Rich Text Editor (FCKeditor) article on page

    Hi all

    I use the "Rich Text Editor" in a page. This page also contains dynamic Action to disable the button so that the loading of the page. Turn off the button while loading the page worked in IE 8, 9 versions. but in the case of IE10, The dynamic Action is down because of this rich text editor this button is not disabled. I get the following error when debugging script

    SCRIPT5007: Unable to get property '1' of undefined or null reference

    As much as we use the text editor (FCKeditor), this FCKeditor_IsCompatibleBrowser() function call browser. In the case of IE10, the error above is due to the following line in this function

    var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ; 

    I want to use 'Rich text editor' on my page, I don't want to change like "text box." I saw some difficulty for this line in the function (the function is in the path "... / i/fck/fckeditor.js"), I can change this line in the function? Is there another way to fix this error?

    Please help me...

    Thank you
    Lacombe

    Hi all

    Rich Text Editor conflicts with DA. It has been classified as Bug. Bug number is 17065043.

    Thank you

    Lacombe

  • Dynamic action to set the value to select the text box list

    Hello

    I want the value in the list box select text box i.e list selection with 5 static values and on the user's selection, this value must be added in a box.

    I am using dynamic measurements. I tried with dynamic action and created the change list box select evnent but now how to set the value of the selection list to
    text box that I don't know.

    Help, please.

    Thanks in advance

    Hello

    I changed the dynamic on this page action to make it work now. I changed the "value Type" action 'Set value' 'Expression JavaScript' and "JavaScript Expression" do the following:

    $v(this.triggeringElement)
    

    This example gets the value of the page element 'DESPROGES', bypassing the server for nothing, as you did before.

    I hope this helps. Let us know if you have any other questions.

    Kind regards
    Anthony

  • Mouse-dynamic action

    Hi all

    I wanted to show the point/button/area description when the mouse is over the respective things.

    For example, on this page of oracle forum, if I move the mouse during communication, a text indicating 'communications' appears.

    Very similar to that is my requirement.

    For little things, I need the text of what we give and in some other cases, we have to get the details of the description column of the data table.

    I tried to use the JavaScript in dynamic action. But I could achieve an alert message or by using the document.write statement.

    I wanted just a small box to display when the mouse hovers over the respective things below.

    How to get there? Pls help me...

    Thanks in advance

    refer to this

    Martin Giffy D'Souza on Oracle APEX: ToolTip in APEX aid: an alternative using popup

    you give helptext of page elements.

    to get see helptext on button

    Using ToolTips in Oracle APEX applications | Inside Oracle APEX by Patrick Wolf

    Leave.

  • Apex 4.2 newbie: dynamic action, PLSQL expression &amp; bind variable

    Hello

    I'm in the Action page dynamic editing > settings-> Expression PLSQL.

    A test, I want to do a textfield equal to the value of another field. All of the remaining work, I need to do on my form is based on this capability, for example, if I can filter the content of my shuttle with a textfield. But for now, nice and simple: a textfield equal to another.

    The problem is that my link variable appears to return a null value when it's non-zero.

    Thus, for example, field entering the PLSQL Expression NVL(:P1_PAGE_ITEM_TEXT,'No') returns always 'no' to a textfield in the page. However, P1_PAGE_ITEM_TEXT is not null - I put a refresh on shot down and I am happily adding text... but the textfield shows simply "no".

    Googling, I see other people had similar problems a few years back and resorted to JS instead of PLSQL. But I think it's more likely that I'm doing it wrong that it's a bug! (Dynamic - Action Alert view the value in the field

    I would be grateful if someone could confirm that it is possible to do what I want to do - and how!

    Thank you
    Emma

    Published by: 995005 on March 21, 2013 05:46

    Published by: 995005 on March 21, 2013 05:47

    Construction IN is always a nasty...
    because you get: where id in "a, b, c" (where a, b, c is the value of P1_PAGEITEM)
    and you should get: where id in ('a', 'b', 'c')
    There is no easy solution for this. If you must certainly construction IN you "convert" the value of P1_PAGEITEM to a table (with a function in pipeline and apex_util.string_to_table). Just Google for a solution.

    Try to make it work with a single value first (before that you increase the complexity)

    And the definition of LOV should be: SELECT description, Àtable FROM returnvalue to display the description.

  • Deleting a tabular form with dynamic Action

    Using Apex 4.2

    Is it possible to delete a row in a tabular presentation using dynamic measurements.

    Right now my sql report contains html and javasript for a button Delete
    '<input type="button" name="Delete" value="Delete"  onclick="del(''delete'','''||a.applicationname||''')">' A2
    I then javascript in my page header
    function del(Request, Name){
    var answer=confirm("Do you really want delete application "+Name+"?\r\n* Provider assignments will be deleted\r\n* Application objects will be deleted\r\n* DB-roles will be dropped\r\n* DB-views will be dropped\r\n* User-synonyms will be dropped");
    if (answer==true) {
      document.getElementById('P10_APPLICATIONNAME').value = Name;
      doSubmit(Request);
    }
    }
    Finally, I have a process page to see the button delete that fires when demand = clear

    Is there a better way

    Gus
    Published by: Gus on January 24, 2013 C 01:43

    Published by: Gus on January 24, 2013 C 01:44

    Head of /Slaps
    Of course, Yes. The text is just interpreted as... Text. I was confused with your previous answers where you said nothing replaced, I thought it was empty. Stupid :)

    I changed some things in your page:
    report-> the link of the DISP_SEQ column: replace CUST_ID ZZZ (just for testing of course)

    Dynamic action:
    delete action to confirm
    Created a new action, run the javascript:

    return confirm("You are about to delete "+$v("P8_CUST_ID")+" ?");
    

    Since confirm returns true or false, returning the value will allow to more to stop or continue actions (as when you would do a "return false;" in a function for example).
    To prove that, I added a true other action after the confirmation of the type run javascript, with an alert in it. It will show when you press ok, and he used when you press Cancel.

    My previous point about where appname: If you'd put an img tag in your link TEXT, then a tag IMG is encapsulated in the anchor tag. When you then bind a dynamic Act of shooting on 'a.delete', the triggeringElement of course would be the anchor tag. Then you can not reference the appname using 'this.triggeringElement.appname' because there is no appname on the anchor element. Instead, it's on the embedded IMG tag.
    On your example page you have this in your link text, in your IMG tag

    appname="'||#CUST_ID#||'"
    

    and this, in the attributes of your link

    id="#CUST_ID#"
    

    The correct value is put in P8_CUST_ID, because the value is taken from the ID attribute of the anchor tag. In this case, you can remove the attribute appname on the text of the tag IMG link.
    If you were to remove the link id attribute value and use the appname attribute, then you will need to adjust as indicated in my previous post.

Maybe you are looking for

  • Default resolution of PDF

    When you export to PDF, Keynote is set to choose the option to default the poorest quality. I always want the highest quality (I do not use the pdf format to record the size of the file, but to send the presentation to clients, which most don't use K

  • HP G62-340US: how to know if a HP G62-340US is a model 1.0 or 1.1?

    How will I know if the laptop is a model 1.0 or 1.1? Ken

  • Music files created with Windows read on Mac...

    Hello I created the music fom my Sansa Clip with Windows Media play on XP as well as with iTunes on my Mac OS 10 x. Anyway to play very well on the Clip. The issue I'm having is that the artists are not sorted quite alphabetically when appearing in t

  • OfficeJet 8600 scan to file on mac

    I have a MAC running Lion (10.7) I just bought a printer Officejet 8600 and I want to use the "SCAN to file" (directly from the Menu of printers). HP says that this does not work on a MAC... Is this correct? someone at - it work?

  • no internet after upgrade! -no connection available

    Original title: no internet after upgrade! With the help of windows 8 and it made a load of updates and now I can't connect to the internet! It does not give me the internet icon (IE bars) but just a square with an icon of cable and doesn't say: no a