JQuery ids in Apex dialog region plug-in

Hi,
Apex 4.0
I have a plug in (here ) that opens a dialogue region when someone clicks on a button. I'm calling a dynamic action to process a PL/SQL procedure but it takes a while to process the procedure. I have another plug-in which disables the screen and uses a pop-up until its finished processing, but to use the 'processing' pop-up I need to link it to my other plug-in.
I can access apex buttons on the pop-up but it has its own jQuery 'OK' button, But I cant seem to find its id anywhere... I tried modifying the code, but Im not sure if I'm correct in assuming that the id is "" in the first place(used firebugs DOM feature to find it). I have a little experience with jQuery but not so with jQuery in apex...
Is there anyway I can assign it one? Or does it already have one?
This is the code I've modified from the plug-in:
l_onload := 'apex.jQuery("#' ||
    p_region.static_id ||
    '").dialog({' ||
    apex_javascript.add_attribute('autoOpen', (l_auto_open = 'Y')) ||
    apex_javascript.add_attribute('modal', true) ||
    apex_javascript.add_attribute('title', l_title) ||
    apex_javascript.add_attribute('width', to_number(l_width)) ||
    'buttons:{' || '"' || l_ok_label || '":function(){apex.jQuery(this).trigger("dialogregion.ok");
$(this).attr("","NEWID");
    $(this).dialog("close");}';

Turns out this was a stupid question, the plug-in had an dynamic action triggering event.

Similar Messages

  • "Dialog region" plugin - triggering OK dynamic action

    Hi all,
    I'm attempting to utilise the "Dialog region" plug-in found here
    http://www.apex-plugin.com/oracle-apex-plugins/region-plugin/dialog-region_30.html
    It's appearing ok, but I initially had trouble associating a dynamic action with the "OK [Dialog Region]" event.
    Someone asked the question back in 2011, but didn't provide details on how they implemented the dynamic action.
    jQuery ids in Apex dialog region plug-in
    I initially issues is because the DA definition still asks for a "Selection type". After trying a few variations, I modified the plug-in to associate an ID with the OK button, and attempted to use "#btn-ok" for a jQuery selector, but this still didn't fire the DA.
    At the time my button rendered as
    <button type="button" id="btn-ok" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Ok</span></button>I ended up succeeding using "DOM Object" of "document" (I thought I had already tried this...), the same way I implemented "Manual Close" for the Skillbuilders modal, but I was wondering if there was a different/more elegant solution?
    Scott

    Refreshing a region through javascript can be done like this:
    $("#region_or_item_id").trigger('apexrefresh');So ideally you would specify 1 attributes for your dynamic action for entering region ids. You'd then need a little parsing for the provided string.
    For example, i'd expect a comma-separated list.
    -- change the region list into a list of jquery selectors
    l_regions := REPLACE(p_dynamic_action.attribute_01, ',', ',#');
    -- jquery will fire the refresh for each selector
    l_result.javascript_function := 'function(){$("'||l_regions||'").trigger("apexrefresh");};';However, refreshing items... Items mostly get their value from the automated row fetch process, and have no individual refresh. You'd need to actually query the table again for the newest value and put this in the item value (keeping in mind that protected items would also need altered checksums). To do this dynamically, you'd also need an ajax callback. Here you'd need to run provided sql which retrieves a value, and put this in the provided item. If that is a route you want to explore, then you can use apex_plugin.util.get_data and its friends to assist you with that!

  • Creating simple jquery TABS in apex

    All,
    I am creating basic jquery TABS in apex but i realized its just not working as i thought... i really need help on this please?
    what i did created in my region i added below code
    <div id="tabs">
    <ul>
    <li><a href="#">Nunc tincidunt</a></li>
    <li><a href="#">Proin dolor</a></li>
    <li><a href="#">Aenean lacinia</a></li>
    </ul>
    </div>
    then at page header i made references,
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <link rel="stylesheet" href="#WORKSPACES_IMAGES#style.css" />than i added child region to the above.
    but all isn't working ....your help is appreciated regards

    First off, why are you referencing a newer version of jquery than what is bundled with APEX? Here is a simple solution for your problem: http://www.warp11.nl/2011/04/tabs-within-apex-using-jquery/
    Thank you,
    Tony Miller
    LuvMuffin Software
    Ruckersville, VA

  • What are the steps to convert any jQuery Plugin to Apex Plugin?

    Dear Apex Experts,
    What are the steps to convert any jQuery Plugin to Apex Plugin?
    Best Regards

    you might also want to have a look at the documentation at http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/advnc_plugins.htm#HTMDB27009
    Missed this Patrick
    We (Oracle) also provide some plug-in examples at http://apex.oracle.com/plugins which you can use as a blueprint. The "Masked Text" would be a good example for you on how to wrap a jQuery plug-in as APEX plug-in.
    Never used that, So don't know that it was a jquery
    Thanks

  • JQUERY integration within APEX

    Hi everybody and merry chrismas...
    I have a problem with jquery within apex. I looked for in previous posts but I can not achieve to make it works...
    I am running apex 3.2.1 on linux with apex listener.
    I want to refresh a report and I found that it was possible to do so using jQuery(...).trigger('apexrefresh'). So I tried to declare jquery...
    I downloaded jquery-1.8.3.js from http://jquery.com and uploaded both as static files in shared components with apex.
    Now I try to define the file in my javascript section like this :
    <script src="#APP_IMAGES#jquery-1.8.3.js" type="text/javascript"></script>
    <script type="text/javascript">
         // refresh of regions impacted by the change of PXX_ID_OPERATION item
         alert("#APP_IMAGES#jquery-1.8.3.min.js");
         alert(apex.jQuery().jquery);
    </script>
    But the javscript failed on the apex.jQuery().jquery instruction.
    What is my mistake ? I am certainly completely wrong but I did not find a clear tutorial on internet. Thank you in advance for help.
    Regards...

    >
    Please update your forum profile with a real handle instead of "975489".
    I have a problem with jquery within apex. I looked for in previous posts but I can not achieve to make it works...
    I am running apex 3.2.1 on linux with apex listener.
    I want to refresh a report and I found that it was possible to do so using jQuery(...).trigger('apexrefresh').Where did you find this?
    So I tried to declare jquery...
    I downloaded jquery-1.8.3.js from http://jquery.com and uploaded both as static files in shared components with apex.
    Now I try to define the file in my javascript section like this :
    <script src="#APP_IMAGES#jquery-1.8.3.js" type="text/javascript"></script>
    <script type="text/javascript">
         // refresh of regions impacted by the change of PXX_ID_OPERATION item
         alert("#APP_IMAGES#jquery-1.8.3.min.js");
         alert(apex.jQuery().jquery);
    </script>
    Always post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and prevent it being mangled by the forum software.
    But the javscript failed on the apex.jQuery().jquery instruction.
    What is my mistake ? I am certainly completely wrong but I did not find a clear tutorial on internet. Thank you in advance for help.The <tt>apexrefresh</tt> event and <tt>apex</tt> namespaced jQuery are APEX 4.x features that are not available in 3.2&mdash;even if you add jQuery yourself.
    APEX 3.2 support expired in February 2012, so the first recommendation is to upgrade to the latest version (4.2) where reports can be refreshed declaratively using Dynamic Actions.

  • Width:100% & region plug-in

    Hi,
    I’m busy upgrading my Google Maps plug-in and one of the things that I want to do is the developer can decide the width of the map by using either px or *%*, irrespective of the region template the developer for the plug-in.
    Currently I define the Map as follows:
       SYS.HTP.p (   '<div id="'
                  || p_region.static_id
                  || '_map" style="width:'
                  || l_width
                  || 'px; height:'
                  || l_height
                  || 'px"</div>'
                 );Now I though the change would be simple enough. I replace *| 'px; height:'* with *|| '; height:'* in the code above and have the developer add either the px or *%* in l_width
    But it does not work; when I enter *%* the map is not shown at all.
    The html code generated by Apex shows
    <td class="tbl-main" width="100%"><div id="R2153213947910908_map" style="width:90%;height:500px"</div></td>What am I doing wrong ???
    Kind regards
    Johannes

    Hi Johannes,
    did a quick test with Firebug. Your problem isn't the DIV. That one actually expands 90%, but because the TABLE around the DIV doesn't use 100% within its surrounding DIV, the table just uses as much space as necessary.
    So you have to go to your page template and change
    <table class="tbl-body" cellspacing="0" cellpadding="0" border="0" summary="">to
    &lt;table class="tbl-body" style=&quot;width:100%" cellspacing="0" cellpadding="0" border="0" summary="">or modify the CSS class definition *tbl-body* to contain width:100%
    Hope that helps
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Using jquery FullCalendar in APEX with dynamic query

    Hi,
    I am trying to implement jquery FullCalendar in APEX and came across thie following post but I am unable to get the events to work. I would really like to see it working with an Application_Process:
    How we can highlight events in Calendar
    Currently I created an Application Process that simply calls a DB table and convert it into json format.
    DECLARE
    v_sql varchar2(400);
    BEGIN
    v_sql := 'SELECT * FROM CAL_FEED';
    apex_util.json_from_sql(v_sql);
    END;
    But I am unsure how to add the events via an Application_Process.
    I have tried the following in numerious ways (events:function, url feed, etc). It does work if I just do an array but would like it as a dynamic query.
    $('#calendar').fullCalendar({
    events: "http://server:8080/apex/f?p=101:53:4352610578859707:APPLICATION_PROCESS=IAT_TEST_CAL_FEED"
    Thank you in advance,
    Jimmy

    Hi,
    I was able to get the events into Fullcalendar with an Application Process but not sure if this would scale well with alot of events.
    Would someone be able to tell me if there is a better way?
    I am currently using an On Demand Application Process called IAT_TEST_FEED:_
    DECLARE
    lv_cal_list VARCHAR2(16000);
    lv_return_str VARCHAR2(32000);
    BEGIN
    FOR i IN (SELECT "CAL_FEED"."ID" as ID,
    "CAL_FEED"."title" as caltitle,
    "CAL_FEED"."start" as calstart,
    "CAL_FEED"."end" as calend
    FROM "CAL_FEED")
    LOOP
    lv_cal_list := lv_cal_list || '{"id":' || CHR(39) || i.ID || CHR(39) || ',' ||
    ' "title":' || CHR(39) || i.caltitle || CHR(39) || ',' ||
    ' "start":' || CHR(39) || i.calstart || CHR(39) || ',' ||
    ' "end":' || CHR(39) || i.calend || CHR(39) || '},';
    END LOOP;
    lv_return_str := '[' || RTRIM(lv_cal_list,',') || ']';
    htp.prn(lv_return_str);
    EXCEPTION WHEN OTHERS THEN
    htp.prn('error');
    END;
    In a HTML Region on a page within the Region Header:_
    <link rel="stylesheet" type="text/css" href="#WORKSPACE_IMAGES#fullcalendar.css" />
    <script type="text/javascript" src="#WORKSPACE_IMAGES#ui.core.js"></script>
    <script type="text/javascript" src="#WORKSPACE_IMAGES#ui.draggable.js"></script>
    <script type="text/javascript" src="#WORKSPACE_IMAGES#ui.resizable.js"></script>
    <script type="text/javascript" src="#WORKSPACE_IMAGES#jquery.js"></script>
    <script type="text/javascript" src="#WORKSPACE_IMAGES#fullcalendar.js"></script>
    <script type="text/javascript" src="#WORKSPACE_IMAGES#fullcalendar.min.js"></script>
    <script type='text/javascript'>
    $(document).ready(function() {
    $('#calendar').fullCalendar({
    events: function(start, end, callback) {
    $.ajax({
    type: "POST",
    url: "wwv_flow.show",
    dataType: "json",
    data: {
    p_flow_id:$('#pFlowId').val(),
    p_flow_step_id:$('#pFlowStepId').val(),
    p_instance:$('#pInstance').val(),
    p_request:"APPLICATION_PROCESS=IAT_TEST_FEED"
    success:function(calevents){
    $.each(calevents, function(i, calevent){
    $('#calendar').fullCalendar('renderEvent', calevent, true);
    </script>
    The line within the ajax call is basically where my concern would be
    $('#calendar').fullCalendar('renderEvent', calevent, true);
    Thank you,
    Jimmy

  • Blog Post: jApex, A jQuery Plugin for APEX

    http://tylermuth.wordpress.com/2009/08/19/japex-a-jquery-plugin-for-apex/
    Tyler Muth
    http://tylermuth.wordpress.com

    Tyler,
    This is really nice! I am also working on jquery plugins for APEX. We should talk to see if we can combine all plugins in one big APEX plugin.
    You can try [jquery.apex-session-0.0.1.js|http://apex.oracle.com/pls/otn/f?p=987654321:54:0:::54] and [jquery.apexpage-0.0.2.js|http://apex.oracle.com/pls/otn/f?p=987654321:52:0:::RP,52] .
    Louis-Guillaume
    [My Blog|http://lgcarrier.blogspot.com]
    [APEX and jQuery demos|http://www.insum.ca/jquery]
    Edited by: lgcarrier on Mar 11, 2009 7:15 PM

  • "Between NVL" - Works in SQL Command, not in APEX report region

    First, I realize I could use dynamic SQL (model 4), but I don't want to (too hard just yet).
    I have a select statement with a series of Where conditions that employ values, in bind variables, supplied by the user.
    I want the choice of parameters to be optional, so I am checking for and replacing nulls.
    Select emp_name from employee_table where
    emp_rating between nvl(:p7_rating_choice, 0) and nvl(:p7_rating_choice, 99)
    and
    emp_language_no between nvl(:p7_lang_choice, 0) and nvl(:p7_lang_choice, 99);
    (the binds should be numeric).
    The actual statement is quite a bit longer, but the point is that the BETWEEN NVL(:x, min) AND NVL(:x, max) piece does not seem to work when used in a report region.
    It works fine if ALL parameters are provided, but returns an error if one or more are null.
    In the SQL command window it works (with a pop-up) just fine.
    By the way, the :p7_lang_choice bind variable is chosen from a LOV list which works in all other cases.
    Also, if I disable nulls (choosing "no" in ITEM page), everything works fine. It seems that the substitution of the min and max values via the NVL returns the wrong data type.
    Any ideas what I have done wrong?

    Thanks Scott.
    Every day brings a little more understanding!
    I also noticed a simplified method in the APEX documentation (although there was no explanation of the code) as follows:
    Where
    (column = :p1_user_input_1 OR :p1_user_input_1 = [null substitution value])
    AND
    (column = :p1_user_input_2 OR :p1_user_input_2 = [null substitution value])
    AND
    etc...
    Using the value you provide in the LOV section for the null, the second part of the OR handles the null situation.
    For some reason I was so tied up with comparing to the column that I never thought to have an OR with a compare to something else.
    Oh well.
    Thanks,
    Norm

  • Save As dialog hangup (Plug-in for Firefox)

    Hi folks,
    I'm running Firefox 5.0, equipped with the Adobe Acrobat (Reader?) 10.1.0.534 Plug-In for Firefox, on several fully patched XP Pro systems.  On a regular basis I view publicly accessible/non-DRMd PDFs via the Plug-in and save a copy by mousing to the bottom of the viewport to activate the autohide toolbar thingy and clicking on "Save a copy".  Doing so causes a Save As dialog to pop up.  Very frequently, an attempt to use that Save As dialog... immediately clicking Save to save to the default directory or clicking the Desktop icon to change to a different directory... will cause that Save As dialog to indefinetely hang.  In order to clear this condition I have to kill the AcroRd32.exe process, and sometimes also the plugin-container.exe and firefox.exe processes as well. The problem is intermittent in the sense that it sometimes happens and sometimes doesn't happen, even for the same exact PDF file.  This is something I've coped with for a very long time, under different versions of Firefox, on old as well as newly created XP Pro installs, before and after purging/reinstalling Firefox and Adobe software, different versions of the Plug-in, etc.
    Is this a known problem?  Has anyone else experienced this type of problem and found a way to prevent it from happening?  Thanks in advance.

    Acrobat is now at 11.0.3. Fixes for earlier versions come later.

  • Jquery Selector in Apex 4.1

    Hi everybody,
    I've just upgraded to apex 4.1 from 4.0.1 and my dynamic actions selecting jquery class selector type (.my_class) now just selects the first element of that class instead of all the elements of class, my_class.
    It was working smoothly in 4.0. Do you have any idea how to resolve this?
    I've already tried instructions in documentation section "About jQuery and jQuery UI Support" http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/app_comp001.htm#BABHCBJI
    reverted my page back to include jQuery 1.4.2 but did no help.
    PS: I use Firefox 3.6.
    The most important Info that I forgot to include*: The selection fails in set value action's affected element selector. When selector seems ok.
    Edited by: oeren on Oct 4, 2011 12:29 AM

    4.1 Release Notes wrote:
    4.13 Dynamic Action Set Value with Multiple Affected Elements
    With the introduction of some built-in options to retrieve multiple values, Application Express no longer supports the ability to retrieve 1 value that could then be used to set multiple page items. This was done for simplicity and usability. If you had defined a 'Set >Value' dynamic action that set multiple Affected Elements to the same value, here is how you can fix this, according to the 'Set Value' dynamic action's 'Set Type':
    *Static Assignment - Define additional 'Actions' for each Affected Element, setting them all to the same value.
    ....Is this the reason?? Should I have to define set values for every single item?

  • APEX HTML REGION

    Hi,
    I am trying to place two HTML region, that play two different youtube videos, however only 1 shows.
    My page consists of the following:
    Display Point: Region Position 01
    10
    Open P1/P2 Calls
    Flash Chart
    20
    Contracts By Country
    Flash Chart (Column 2)
    Display Point: Region Position 02
    30
    CSD Monthly Meeting
    HTML
    40
       Spare Parts
    HTML (Column 2)
    Any ideas as to why the other region does not display, i tried to mess around with the layout, but something always goes missing, i guess there is a limitation of the page itself?

    Hi,
    I've no idea how you try to display your youtube videos, but you can add more than one video if you embed them as iframes.
    Check my blog:
    Vincent Deelen: Embedding media in your APEX application
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Cannot get an Apex HTML region with table with a background image to resize image to fit table

    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    Thanks in advance!
    Geert

    Geert01 wrote:
    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    This is a workaround. What's your real goal? Why do you want to do this?
    What browser(s)/version(s) are you using? All current browser versions have support for CSS3 background sizing which is the proper way to do this.

  • ApEx Calendar Region - enhanced behavior using JavaScript

    Hi everyone,
    I recently wrote about the built in calendar. Comments/remarks are welcome! :)
    http://insum-apex.blogspot.com/2008/07/apex-calendar-enhanced-behavior.html
    Louis-Guillaume
    Homepage : http://www.insum.ca
    Blog : http://insum-apex.blogspot.com

    Hi Emma,
    You could do it with an POP-UP LOV and Dynamic Action.
    Dynamic Action
    - Change
    - item P65_STAFF_ID
    True Actions
    1 - PL/SQL block;
         - PL/SQL Code in this block you can get the last of first date for the absence of the STAFF_ID and put it in the date item for the calendar (eg P65_CALENDAR_DATE);
         - Page Items to Submit P65_STAFF_ID
         - Page Items to Return P65_CALENDAR_DATE
    2 - Execute Javascript Code
         - apex.widget.calendar.ajax_calendar('M','same',$v('P65_CALENDAR_DATE'));
    This way the calendar will be refreshed and set to the date in P65_CALENDAR_DATE.
    You can also put "null;" in the PL/SQL block, leave the Page Items to Return empty and remove the ",$v('P65_CALENDAR_DATE')" part from the Javascript code. This way you do not open the calendar at the right date.
    I made a small example at http://apex.oracle.com/pls/apex/f?p=14257:4 (login as demo/demo).
    Regards,
    Kees Vlek
    <tt>Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66</tt>
    If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.

  • Apex 4.0 Plug-ins

    I'm sure I saw an online resource of Apex 4 plugins, where you could submit, download and rate plugins - mostly written by Patrick W ;) Anyway, I can't for the life of me find a link, or remember where it was.
    A quick point in the right direction would be very much appreciated.
    Cheers
    Shunt

    I remembered:
    http://www.apex-plugin.com/
    Can we get this link added to the community page if it's not already there. Thanks

Maybe you are looking for

  • HP Deskjet All in ONe L7650 will not print black only --

     Started doing this with previously working black cartridge, updated software--prints, but blank page comes out when set to black ink only; prints other colors.  Changed black print cartridge and still will not print black.  Diagnostic page prints ot

  • Pie chart wedge end position.

    Hi,      I need one urgent help. I need to get start and end position of the wedge corner's in pie-chart. I need to draw some thing using those points. So i need thier global positions. Thanks, Sathyamoorthi.

  • Using MacBook Pro as Digital Optical Audio bridge...

    I have an idea for my MacBook Pro, but I'd like to know if it's feasible before I go and buy what I'd need to test my plan: I have an Xbox 360 with digital optical audio out (TOSlink), and I have a MacBook Pro with digital optical audio in (through t

  • How can I define a new Search Node type?

    Hi experts! I'm trying to modify PPOME transaction, but I can't create a new Search Node type. Can anybody give me the necessary steps I have to do? Other question, Is it possible to create a new Search Node for a Organizational unit? Or this only co

  • Iphone 4 at&t can i do the factory unlock

    i av