Possible Attach JavaScript To APEX_ITEM.SELECT_LIST

I've tried to search the forum on this but can't seem to find any results, but my confidence in the search isn't very high either.
Does anyone know if it's possible to attach a JavaScript function to a SELECT LIST generated using the APEX_ITEM.SELECT_LIST API?

Hello,
You can use the p_attributes parameter to add JavaScript events to the select list item.
Regards,
Arie.

Similar Messages

  • APEX_ITEM select_list is not working

    Hi,
    I am using the below query in my sql select statement .
    select
    htmldb_item.HIDDEN(1,ID) HIDDEN,
    APEX_ITEM.SELECT_LIST(49,DECODE("VERSION",NULL,'-Select-',"VERSION"),decode(get_lov_values(PROD_LEVEL_1),null,'not available',get_lov_values(PROD_LEVEL_1))) "VERSION1"
    from WIKI_PROD_CGBU_CUST
    When i run the above query i get the output in the respective column as given below
    hidden:
    <input type="hidden" name="f01" value="7522" />
    version1:
    <select name="f49" ><option value="7.0" >7.0</option><option value="7.2" >7.2</option><option value="7.2.1" >7.2.1</option><option value="7.3" >7.3</option><option value="7.3.1" selected="selected">7.3.1</option><option value="7.4" >7.4</option><option value="Other" >Other</option></select>
    PLease can anyone help me with this.
    Thanks,
    Vikas

    Hi,
    What does the function get_lov_values return?
    The expected output for the APEX_ITEM.SELECT_LIST is a quoted comma separated list.
    So, if you havn't already done it, try changing your return statement to look like this
    -- here x is the comma separated list you constructed in the function
    --change the line
    return x;
    --to
    return dbms_assert.enquote(x);Regards,

  • How to retain selected value in apex_item.select_list?

    Hi,
    I've a report region query-
    select distinct col1, col2,
    APEX_ITEM.HIDDEN(2,col3)||
    APEX_ITEM.SELECT_LIST(1,'No_Action','Valid;Y,Invalid;N') Action
    from <tab1>
    When 'Y' (valid) selected from the select list and SUBMIT is clicked - a validation and then page processing pl/sql process will run for the record, branching to the same page.
    If validation fails custom error message comes on screen, but value of column "Action" is reset to default 'No_Action'.
    Can anyone please tell me how can I show the last selected value in column "Action"?
    Please reply asap. Regards.

    To be able to show the last selected value you need to make the value persistent, that is update it in some column in the table.
    So the next time the report is run (refreshed) it fetches the value from the table/column . Then change your query to something like
    select distinct col1, col2,
    APEX_ITEM.HIDDEN(2,col3)||
    APEX_ITEM.SELECT_LIST(1,NVL(COL_YN,'N'),'Valid;Y,Invalid;N') Action
    from <tab1>COL_YN is the column where you stored the last selection. Unless you store it in some table/column you cannot get it back into the report when it is refreshed.
    The other way of course is to use APEX_COLLECTIONS , but that might be more complex.
    However, you need to think whether you really need the APEX_ITEMs API for this? If you just edit the Report Attributed and Edit the column definitions you might be able to achieve the same thing without having to use APEX_ITEM.
    Regards,

  • Attaching Javascript function to Buttons in XML forms

    Hi ,
    Can anyone tell me how can we attach Javascript function or code in XML forms ?
    Cheers
    Nitesh

    Hi Nitesh,
    If you use a label with style urBtnStd urTxtStd you can make a link that
    looks like a button which will fire the URL in the Hyperlink property. The
    XMLFB tries real hard not to let you put Javascript in there for security
    reasons. I tried some attribute tailgating, but it filters those kinds of tricks
    out. (This is where you try to try to sneak in another attribute at the end
    of one attribute value by inserting a quote character). You could also
    hand patch the XSL, but this will get overwritten with the next build of
    the XMLFB project.
    Regards,
    Darin

  • Attach JavaScript not working in Acrobat Reader XI

    Hello,
    I created a fillable PDF in which I used the following JavaScript for an "Attach" button: 
    this.importDataObject("MyFile");
    This JavaScript worked and allowed the end user to attach files to the PDF in previous versions of Acrobat (through version 10 / Pro), but the button's functionality does not work in Adobe Acrobat XI.  The button has no functionality when clicked, and no errors are received indicating what the issue may be.
    Is there a bug that exists making this file not compatible with the Acrobat XI version, or is my coding outdated/inaccurate?
    Please advise and thank you for your help!
    Jessi Fenton

    Did you ever figure this out? I am also having problems with the "No Hand" javascript which turns off the (not very helpful) page-forward hand icon (a hand symbol with a down arrow) which confuses our users when in fullscreen mode. We create interactive PDFs and everything worked fine up to Acrobat X/Reader X. Now in XI it doesn't allow the internal link icon (pointing finger) nor weblink icon (pointing finger with W) to appear. It just remains a plain o’ hand icon no matter what you mouse over even though there are links present.

  • Trying to Create Tabular Form with apex_item... and apex_item.select_list

    I am trying to create a tabular form that uses multiple altec_item functions (select_list, select_list_from_LOV,...). Whenever I attempt to create a new page and select Tabular Form, I am forced to select a table and columns. So I have just selected any table and once the sql is created, I overwrite it with my own sql. When I try to apply the changes, I get an error anytime I use apex_item... for a particular column. I have tried the same creating a standard report with the same results. I have read at least 20 examples but none say where to start from when creating the tabular form and just jump right in to the code. Can anyone please point me in the right direction?
    Thanks,
    Jerryu

    You can start with creating a simple classic report. You can use apex_item functions in your query and later set your column attributes to "Standard Report Column". Basically, you are creating a updateable report.

  • Other language possible than Javascript?

    I am new to developing apps for Office 2013. I see that you need to program in JavaScript. Is it also to program in VB.NET? My apps only need to run on Windows machines.

    Hi,
    no this is not possible. "Office Apps" are by design web applications and the only way to interact between Office and your app is the Javascript library provided by Microsoft. If your app is not just a simple website but also contains server side
    code (for example ASP.NET MVC webapplication), than you can of course work on that side with VB.NET.
    The other thing you could do is think about writing an excel add in or something like that, but this is again something completely different than an app (app != add in). Add Ins are for example not released in the app store and need to be installed locally
    etc.

  • It possible using javascript to change the value of another jsf text field?

    In my case, I have an input text field and would like to copy it's value on the onchange() event into another text field. Using the destination text field's Id and assigning some content with it's .value property

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • Filter Report based on Apex_item.select_list

    I have question for you here.
    I have a page where I create some page items with apex_item.select_list_from_query based on a hidden item.
    So for example sometimes it creates 3 select lists and another time it creates 2 select lists. That works fine.
    But now I want to filter a report dynamically based on the selected values in these select lists.
    Does anyone have a solution to do this?

    Yes I understand that you have to know more about the table structure. So I translate that part of the datamodel in English for you and you can see it by the url below:
    http://i48.tinypic.com/349dp4g.jpg
    So it is a many to many relationschip between Article and ArticleOptions and the Values table contains the article id and article option id, who are together the primary key.
    And of course the values table contains the corresponding value.
    So if you can see in the datamodel a article group can contains multiple articleOptions, therefor I had to create dynamically the select lists based on the number of articleOptions of that group. That works! And thanks to your help I can filter the article list based on the selected value in a select list. But the problem is that when I have 3 select lists I have to filter the report based on the values in the 3 select lists.
    For example the first select list is articleOption Colour and contains the values blue,white,black. I select black, the report have to show only the articles who have te colour black. And the second list for example contains the articleOption storage with the values 150gb,250gb,500gb.I select 500gb. The report only have to show articles who contains the colour black and a storage of 500gb.

  • Hyperlink in a dialog - possible? (Javascript)

    Hi
    Is it possible to make a hyperlink in a dialog
    E.g., To execute a mailto: which would open the email app with settings
    Thanks
    David

    Hi David,
    What you can do is create and save a file with an .html extension (say
    into the Folder.temp folder -- just don't try  Folder.appData
    In the file, add some html like this:
    Then you can do an execute() on that file.
    It should open the browser, and then immediately open the default email
    client installed on the user's machine.
    If you're lucky, the tab that was opened in the browser will also close
    (and if it's the only tab, then the entire browser). But probably what
    will happen is that the browser will stay open with a script alert!

  • Item Level Help with APEX_ITEM

    I manually created a report using APEX_ITEM (APEX_ITEM.SELECT_LIST(4,'Y','Yes;Y,No;N') FIELD4). The items are set to 'Standard Report Column'. I was looking for a way to have the item label show as a link and associate some help text with it (just like a form item). Is it posssible to do this?

    Try specifying something like
    <a href -  "javascript:help('Field4')"> Field4 </a> (Note '-' is actually to be '=')for the 'column heading' field of the 'column attributes page' .
    Varad
    Edited by: varad acharya on Jan 8, 2009 7:42 AM

  • Update using Apex_item.hidden help

    Hi,
    I want to update a table using apex hidden item as reference. But while updating, I encounter an error as invalid number. Here ID is the primary key column which is of datatype number.
    Below is my report query
    Select
    ID,
    DAYS_SPAN,
    comments,
    apex_item.hidden(1,ID)||APEX_ITEM.SELECT_LIST(2,Action,'A,B,C,D') "Attachment Action",
    from TBL_ACTION_LIST
    where ITEM_ID = :P5_ITEM_ID
    I have written an after submit process as follows,
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    UPDATE TBL_ACTION_LIST
    SET
    Action= APEX_APPLICATION.G_F02(i)
    WHERE ID = to_number(APEX_APPLICATION.G_F01(i));
    END LOOP;
    END;

    Put some debug message in ur code to see the value of APEX_APPLICATION.G_F01 each time to make sure that you are actually getting a number in that.
    Another simple thing that you could do is(for debugging), assign an variable with the APEX_APPLICATION.G_F01's value inside the loop. Write an exception that raises with the original error message concatenated with the variable's value.
    DECLARE
      lc_debug VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
        lc_debug := APEX_APPLICATION.G_F01(i);
        UPDATE TBL_ACTION_LIST
        SET
        Action= APEX_APPLICATION.G_F02(i)
        WHERE ID = to_number(APEX_APPLICATION.G_F01(i));
      END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
      RAISE(-20999, ' ID Value: '||lc_debug
                           ||CHR(10)||SQLERRM
    END;If required check the F02 array value too(the DB column for ACTION is varchar2, isn't it ?).
    This should show you the ID value which raises the error.

  • Apex_item.radiogroup

    Hi,
    I need help regarding the apex_item.radiogroup.
    I am fetching the data from table in report region. There is one status column which has either 'A' active or 'I' inactive. corresponding to one unique record we can have multiple subrecord and
    only one is active. In the report region i am trying to show the active and inactive radiobutton per row. and if select any row as active in the report other rows radiobutton should be inactive so once i hit the update button i don't have to think which all other went to inactive.
    my query looks like
    select apex_item.hidden(10, primary_key) || record,
    apex_item.radiogroup(3, h.status,'A', 'Active')||apex_item.radiogroup(3, h.status, 'I', 'Inactive'),
    case when rec_flag = 'N' then 'NO' else 'YES' end "flag"
    from table
    If there is 4 rows selected based on this query only one row radio button is highlighted.
    I am new to apex and need your help.

    Hi,
    For the select list issue - the fourth parameter of the APEX_ITEM.SELECT_LIST function allows for attributes, so you can do:
    apex_item.select_list(3, h.status, 'Active;A,Inactive;I','onchange="javascript:myfunction(this);"') "Status"Then you create a function called myfunction(ss) that is triggered by the value of the select list changing - onclick is not used here. As we are passing "this" into the function, we can loop through all select lists, except for the current one and change their values where needed:
    function myfunction(ss)
    if (ss.value == 'A')
      var sLists = document.getElementsByName('f03');
      var k;
      if (sLists)
       for (k = 0; k &lt; sLists.length; k++)
        if (sLists[k] != ss)
         sLists[k].value = 'I';
    }So, as long as we change the current list to A, then we change all the others to I.
    For the radio buttons, if you need to use two buttons per row, you should have a radiogroup that is for each row separately. Your use of "pk_table" for the Inactive button should also be used for the Active button. When the user clicks on either Active or Inactive, you would then have to loop through all the radiogroups and set the appropriate value.
    To get to all the buttons, you have to do something like:
    var x = document.getElementsByTagName("INPUT");
    var k;
    if (x)
    for (k = 0; k &lt; x.length; k++)
      if (k.type == 'RADIO')
       do something herre
    }Andy

  • Is it possible to force the user to login again when using oauth 2 (implicit grant)

    Hi,
    I'm trying to build an application based on a rest webservice in APEX which is being accessed by a javascript frontend via ORDS. I'm using the "Implicit grant" flow of OAUTH 2.
    When the user is finished with the application, he/she should be able to logout of the application, so another user can login (on the same machine and browser). But, without clearing all cookies, ORDS will automatically give an access token for the previous user, without showing the login screen to allow/deby access to the rest web service.
    (Clearing the cookies is not possible via javascript, since they are httponly)
    I know it is not the "normal" way to use oauth2, but I would like to be able to log-out a user. So how can I force ORDS to show the loginscreen again to give another user the possibility to login?
    Alexander

    You can force the implicit code flow to prompt the user to sign in by including _auth_=force in the approval request query string. To follow the example shown in the developer guide [1]
    change:
    https://server:port/ords/resteasy/oauth2/auth?response_type=token&client_id=CLIENT_IDENTIFIER&state=STATE
    to:
    https://server:port/ords/resteasy/oauth2/auth?response_type=token&client_id=CLIENT_IDENTIFIER&state=STATE&_auth_=force
    [1]: REST Data Services Developers Guide

  • Apex 3.2 hook javascripts to IR and execute those when report is refreshed

    Hi,
    You propably have see tricks to attache javascript to IR refresh using time out and gReport.l_LastFunction e.g. these.
    http://roelhartman.blogspot.com/2010/04/alternative-to-alternating-row-colors.html
    http://www.talkapex.com/2009/03/column-groups-in-apex-interactive.html
    Here is alternative solution:
    You need load jQuery 1.4.2 e.g. in page template header
    Create page zero if your application do not have one. Then create HTML region before footer with no template.
    Place code to region source
    <script type="text/javascript">
    ;(function($){
    $.htmldbIrBusyGrap=$.fn.htmldbIrBusyGrap=function(){
    /* for bind IR ajax */
    /* check do we have IR on page */
    if($('#apexir_WORKSHEET_REGION').length>0){
      /* replace apex internal function _BusyGraphic */
      gReport._BusyGraphic=function(pState){
       if(pState==1){
        /* ir ajax start trigger htmldbIrAjaxStart event and show loading icon */
        $.event.trigger('htmldbIrAjaxStart');
        $('#apexir_LOADER').show();
       }else{
        /* check is there data stored to #apexir_WORKSHEET */
        if(!$('#apexir_WORKSHEET').data('htmldb')){
          /* store data to #apexir_WORKSHEET */
          $('#apexir_WORKSHEET').data('htmldb',{irReady:true});
          /* trigger htmldbIrReady event */
          $.event.trigger('htmldbIrReady');
         /* hide loading icon and trigger htmldbIrAjaxEnd*/
         $('#apexir_LOADER').hide();
        $.event.trigger('htmldbIrAjaxEnd');
       return;
      $.event.trigger('htmldbIrReady');
    $.htmldbIrReady=$.fn.htmldbIrReady=function(fn){
    $(function(){
      if($.isFunction(fn)&&$('#apexir_WORKSHEET_REGION').length>0){
       $('#apexir_WORKSHEET_REGION').bind('htmldbIrReady',fn);
    })(jQuery);
    addLoadEvent(function(){$.htmldbIrBusyGrap();});
    </script>Now your IR will trigger htmldbIrReady event when report is refreshed.
    Usage example
    <script>
    $(function(){$('#foo').bind('htmldbIrReady',function(){alert('Hello');});});
    </script>Also it trigger htmldbIrAjaxStart and htmldbIrAjaxEnd events.
    Usage example
    <script>
    $(function(){$('#foo').bind('htmldbIrAjaxStart',function(){alert('Ajax start');});});
    $(function(){$('#foo').bind('htmldbIrAjaxEnd',function(){alert('Ajax end');});});
    </script>Or use function $.htmldbIrReady example
    <script>
    $(function(){$.htmldbIrReady(function(){alert('Hello');});});
    </script>Small demo that logs those events here
    http://actionet.homelinux.net/htmldb/f?p=100:87
    Hope this helps and you post other innovative solutions or usage examples about this
    Regards,
    Jari

    Jari,
    i have found my bug which prevented the Page from working.
    i have a custom build apex_loader
    <script src="#WORKSPACE_IMAGES#jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="#APP_IMAGES#jquery.simplemodal-1.3.5.js" type="text/javascript"></script>
    <script type="text/javascript">
    * @param pRegionStaticId ID of region to set to modal
    * @param pOptions Options for modal Screen. See: http://www.ericmmartin.com/projects/simplemodal/#options for more info
    goModal=function(pRegionStaticId, pOptions){
      var vDefaults = {persist: true, overlayCss: {backgroundColor: '#606060'}}; // Note: It's important that you leave the persist = true otherwise items values will be cleared
      pOptions = jQuery.extend(true,vDefaults, pOptions);
      // To maintain order of APEX items (see forum posting above)
      $('#' + pRegionStaticId).wrap('<div></div>');
      // toon het ajax laad scherm
      html_ShowElement('AjaxLoading');
      // Laat de region zien, in dit geval 'apexir_LOADER' --> het icoontje bovenin
      //  $('#' + pRegionStaticId).show();
      // Open het modal scherm
      //  $('#' + pRegionStaticId).modal(pOptions);
    }// goModal
    * Sluiten van het modal scherm
    modalClose=function(){
       // verberg het ajax laad scherm
       html_HideElement('AjaxLoading');
       $.modal.close();
    }// modalClose
    // OnLoad tasks
    $(document).ready(function(){
      // Voor alleen uit wanneer er een IR is op de pagina
      if ($('.apexir_WORKSHEET_DATA').length > 0) {
        // See apex_ns_3_1.js for _BusyGraphic
        function dispIRBusyGraphics(pState){
        if(pState == 1){
            // Here apexir_LOADER is the object ID.
            // You can use your own region if you wanted to etc...
         goModal('apexir_LOADER', {position:['30%',]});
        else{
           modalClose();
        return;
        }// dispIRBusyGraphics
        function updateIRJS(){
         // This time out is required since after the report is refreshed
         // via AJAX, need to reattach the l_LastFunction command
         setTimeout(
           function(){
            gReport._BusyGraphic = function(pState){dispIRBusyGraphics(pState);};
           1000
        gReport = new apex.worksheet.ws('');
        gReport.l_LastFunction = function(){dispIRColGroups();}
        // Need to put timeout since not registering on initialization
        setTimeout(function(){gReport._BusyGraphic = function(pState){dispIRBusyGraphics(pState);};},500);
        updateIRJS();
      } //If IR exist
    </script>and when i disabled this on page 0 the functionality was working correctly.
    Thanks for demoing this in the application.
    Marco

Maybe you are looking for

  • How do i get my downloads from mt computer to my ipod?

    I need help beacuse I need to figure out how to put apps onto my iPod from my computer.

  • &uuml is shown as &uuml instead of ü in FireFox 3.6.13 NL

    <blockquote>Locking duplicate thread.<br> Please continue here: [/questions/776785]</blockquote><br> the ampersand uml code is showed instead of interpreted this independent of existance or abundance of meta code forlanguage and codeset.

  • What are the new features on the DESKTOP version of LR 6?

    I was going to upgrade until I had a chat with customer service and was told that the new HDR, photo merge, etc, were not on this version. Why should I spend the $79 to upgrade.  What does the new version have.  I have been using LR 4 successfully wi

  • No NetWeaver 2004s Java Trial anymore? How to test AdobeDocumentServices?

    Hello, in former times SAP offered a NetWeaver 2004s Java Trial Edition for Windows that also included the Adobe Document Services. But when I have look at the download section today, I can't find this trial edition anymore. The only thing that I can

  • Back-up disk

    Hi I am having problems with my external backup HD. The Iomega drive is plugged into the back of my iMac (USB 2.0) . When I switched on my backup HD, I got the error message that the HD was not properly ejected last time etc, etc.. I always eject bef