How to enable the Java Script function in APEX 4.2.6 running on the result of an Xquery query.

How to take a SQL query result in the source section of an APEX "agenda of the page" field and allow this request to be formatted using XML in an HTML format for a Java Script file to perform a function on the result?

Currently I have the following text:

To query the DB table and format the result as HTML:

SELECT XMLELEMENT ("UL id ="ticker01"', XMLAGG (XMLFOREST (Scroll_Mess AS LI))") "item UL' OF Web_Ticker where Mess_Id < 10 order by Mess_Id;


That displays the following:


< UL id = "ticker01" > < LI > HELLO < /LI > < LI > HELLO < /LI > < /UL id = "ticker01" >

I need the output of this to be visible to a JScript function that is currently called the "head of page", but there doesn't seem to be its scope? The function works correctly if there is a list in the page field items 'Text element Pre' but does not work correctly when used in conjunction with the query to generate a table form.

If everyone is happy to help I would be grateful .

James.

Solved!

In order for the request to be part of the DOM of the page of the APEX, the Java Script allows to perform its function on the result marked "HTML" to query, you must set page of the apex on which the query resides and then add the inner text of this page to a second variable for which the function of web ticker can run on as follows:

$(function() {})

var x = $("#P9_TICKER_DATA");

var y = x [0] .innerText;

x.Append (y);

$("UL#ticker01").liScroll ();

});

From there, on the Java script is able to properly see the result of the query in HTML format.

Tags: Database

Similar Questions

  • How to write the result of a SQL query to a text file?

    I'm using Oracle 11 g and SQL Plus.

    I have a large table called side.

    Whenever I do


    SQL > select * rating.

    The output goes well beyond what can show the screen sqlplus. So, I want to store the result of this query in a text file.

    How is that possible? Help, please. Thank you.

    SQL > SPOOL results.txt
    SQL > select * rating.
    SQL > SPOOL OFF

  • How to display the results of a MySql query in multiple columns?

    Hi, I know how to display PHP/MySq

    l of the results in a single column, but I'm really stuck to show

    Ying the results of several columns in DW CS4.

    Can someone help me with a code example? I'm new to php/mysql. Thank you

    Are you asking how to rotate the query results? Do a search for a horizontal loop. If this isn't what you're asking, please provide more details.

  • Create the Java script function

    Hello

    I try to create the following java script function to retrieve a character string:

    String.prototype.left = function (findWhat)

    {

    try

    {

    var = this.search (findWhat) position;

    If (position > - 1).

    Return this.substr (0, position);

    }

    catch (e)

    {

    / / alert (e.message);

    }

    return "";

    };

    var text = "myText-description";

    var separator = "-";

    In this example, I try to extract the word on the left before the "-" delimiter (mtText)

    But I get the following error message: failed to add a property to an object sealed: left

    My question is how can I create a simple js function in the Orchestrator in the following example

    Thank you

    Hello

    You can try the code to retrieve a string from left to right below the delimiter.

    
    searchstr();
    
    function searchstr() {
       try{
       var str = "angela.soni"
       var pos = str.indexOf("."); // Currently this is hard coded, you can pass delimiter as an input parameter.
       if(pos>-1) {
          var substr = str.substring( 0, pos );
          System.log(substr);
       }
       else {
          System.error("Delimiter not found");
       }
      }
      catch (e) {
       System.error("Search failed: " + e);
      }
    }
    

    I hope this would help you.

    Thank you!

    Angela

  • Call a java script function, the loading of the page while in ebiz

    Hi gurus of the OFA.
    I have a requirement for a java script to each page renders OFA function call or charges.
    That is when any OAF page load or make in Oracle e - biz, I have a java script function that should be called is possible to implement the above mentioned requirements.

    Thanks in advance...
    Sourav

    OK, I have your condition. It's one of the basis OFA classes then you can try class decompile OAPageBean. I tried yesterday, there are many interesting ways you can add JavaScript and recompile class. do the backup of old, of course. And your JavaScript will work on any page of the OFA

  • Satellite L500 - how to enable the WLAN?

    I replaced a hard drive of mine (L500 PSLS0A - 08 p 002) and I installed Windows7 64 bit on it.
    I used to market its WIFI by pressing the FN + F8 keys.
    But now I can't on it using the method.
    I downloaded its end drivers.
    In reality its all the function keys do not work.
    Please let me know how to enable the WLAN and function keys.

    Hi kim2kjy,

    You have installed Windows 7 Toshiba or normal Microsoft disk recovery disk?

    The FN keys to install Toshiba Value added Package, and Flash Cards Support utility. These two tools can be downloaded on the official page of Toshiba.

    Check this box!

  • How to enable the CDI an area of weblogic (not IntegratedWeblogicService)

    I created a project with IDC in Jdeveloper 12.1.3 and it works very well in IntegratedWebLogicService. I deploy it as a WAR file to a weblogic domain. However, the jsf pages cannot get the value of beans and just show #{items.smallest} , #{items.biggest}.

    How to enable the CDI in a weblogic domain base?

    Thank you very much.

    CDI is not an option available on Weblogic server or a configurable parameter.

    It is a feature of the Java EE 6 platform and you can not disable/enable the only feature on weblogic server.

    Try it below to solve the problem

    Connect to the stand-alone server administration console and check if libraries necessary dependency for your application is deployed, or the necessary components have been extended during the creation of the field.

    You could quickly check comparing deployments of libraries on both stand-alone and integrated administration console weblogic server.

    Registered the application libraries is also written in the config.xml file, which can also be used to compare.

    It could be useful!

    Thank you

    Vijaya

  • How to display the result sqlplus in java?

    I want to call sqlplus to run some commands sql in java, but how can I print the result of sqlplus?

    In java code, I call sqlplus as:

    Process of p;
    Run the command
    p = Runtime.getRuntime () .exec (commandString);
    print the result of the command
    InputStream inputStream = p.getInputStream ();

    How to display the result of the execution?

    Published by: Yi on February 26, 2012 23:41

    You can use ProcessBuilder. Copy the following code starts sql * more and runs the script in the variable "filename". It displays the results in the console of NetBeans.

    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.File;
    import java.util.Map;
    
    public class test1 {
    
        public static void main (String args []) {
    
            test_script();
        }
    
        public static void test_script () {
    
            String fileName = "@test_table.sql";
            String sqlPath = "E:\\";
    
            String sqlCmd = "sqlplus";
    
            String arg1   = "user/password@sid"; -- plug in your user, password and db name
            String arg2   = fileName;
            try {
                String line;
                ProcessBuilder pb = new ProcessBuilder(sqlCmd, arg1, arg2);
                Map env = pb.environment();
                env.put("VAR1", arg1);
                env.put("VAR2", arg2);
                pb.directory(new File(sqlPath));
                pb.redirectErrorStream(true);
                Process p = pb.start();
              BufferedReader bri = new BufferedReader
                (new InputStreamReader(p.getInputStream()));
              BufferedReader bre = new BufferedReader
                (new InputStreamReader(p.getErrorStream()));
              while ((line = bri.readLine()) != null) {
                System.out.println(line);
              }
              bri.close();
              while ((line = bre.readLine()) != null) {
                System.out.println(line);
              }
              bre.close();
              System.out.println("Done.");
            }
            catch (Exception err) {
              err.printStackTrace();
            }
    
        }
    
    }
    

    Here is the content of the script at E:\\test_table.sql

    Prompt drop TABLE ANOTHER_TEST;
    DROP TABLE ANOTHER_TEST CASCADE CONSTRAINTS
    /
    
    Prompt Table ANOTHER_TEST;
    CREATE TABLE ANOTHER_TEST
    (
      BATCH_SEQ             NUMBER,
      BATCH_GROUP_ID        NUMBER,
      STATUS_FLAG           VARCHAR2(30 BYTE),
      OBJ_BEING_PROCESSED   VARCHAR2(80 BYTE),
      BATCH_RUN_START_DTTM  DATE,
      BATCH_RUN_END_DTTM    DATE,
      CREATE_DTTM           DATE,
      CREATE_USER           VARCHAR2(30 BYTE),
      UPDATE_DTTM           DATE,
      UPDATE_USER           VARCHAR2(30 BYTE)
    )
    LOGGING
    NOCOMPRESS
    NOCACHE
    PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )
    MONITORING
    /
    
    COMMENT ON TABLE ANOTHER_TEST IS 'This is a test table.'
    /
    
    EXIT
    /
    
  • How to enable the continuation of the Standby Option for a USB mouse: I do not see the "allow this device to wake the system from standby mode' check box__

    I use Windows XP Home Edition and I am fully up to date with the latest version of the software.

    I would like to activate my mouse USB power out "sleep mode" on my computer.  I found the help topic that describes how to do this: http://support.microsoft.com/kb/280108 how to enable the continuation of the Standby Option for a USB mouse

    However, when I follow these steps, I don't see the 'allow this device to wake the system from standby mode ' check box on any of the windows as described in the documentation for Ms.
    I use a Microsoft Comfort Optical Mouse 3000 (IntelliPoint) USB

    Any help would be greatly appreciated!

    This gives a test:

    1. click on START
    2. click on 'run '.
    3 type "notepad" (without the quotes) and press enter
    4. copy and paste this into Notepad:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usb]
    "USBBIOSHACKS" = DWORD: 00000000
    "USBBIOSx" = DWORD: 00000000

    5. click on file > save as
    6. change the dropdown to "all files".
    7 type usb.reg as the file name and save the file somewhere easy to access
    8 go find the file and double click it. Confirm that you want to add it to the registry
    9 restart the computer and see if you can wake the system from standby mode

    For reference, take a look at this:
    http://www.dslreports.com/Forum/r19635912-missing-power-management-tab

    Let us know,

    Thank you!

    Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to enable the automatic configuration service in Windows XP

    How to enable the automatic configuration service in Windows XP

    Hi SamuelOkon,

    Are you facing any problem on your computer?

    You can follow the steps in this link & check if it helps.

    How to activate the Wireless Auto Configuration startup type?

    Hope the helps of information.
    Please post back and we do know.

  • How to enable the ReadyBoost feature?

    I would like to know how to enable the ReadyBoost feature.

    Does anyone have any suggestions?
    Thanks in advance for your suggestions

    I would like to know if it is possible to assign an SSD internal to do this instead of using a USB drive or not.  I tried ReadyBoost option in SSD drive is not available.

    Do you have any suggestions?
    Thanks a lot for your suggestions :>

    Hello

    Sorry, but you cannot use an internal hard drive for ReadyBoost. Indeed, an SSD can not use ReadyBoost.

    This feature can use a USB flash drive external as a hard drive cache to improve the disk read performance.

    More information on the following links.

    Understand the ReadyBoost and the question of whether it will Speed Up your system
    http://TechNet.Microsoft.com/en-us/magazine/ff356869.aspx

    Turn ReadyBoost on or off a storage device:
    http://Windows.Microsoft.com/en-us/Windows7/turn-ReadyBoost-on-or-off-for-a-storage-device

    Concerning

  • How to enable the remote desktop on windows 7 because it is missing in system properties | using Remote tab

    How to enable the remote desktop on windows 7 because it is missing in system properties | tab use remotely.

    I am running Windows 7 Ultimate edition with service pack 1.

    I used to connect my mac via the desktop tool to remotely (2.1) on my mac to my pc windows 7.

    Now, it does not.  Check the services of windows 7 I have ensured that all the remote control * services are enabled, but I still do see the Remote Desktop option in system, under the remote settings properties.

    Any help would be appreciated.

    MasterJay1

    Click Start, click Help, and then type this phrase in the search box:

    enable remote desktop

    Article 5 will have explicit instructions for the task.

  • How to enable the TOC in cp Bill?

    I am a new user to Captivate.

    How to enable the TOC in cp Bill? Please suggest

    Go to option menu project-> Table of Contents-> select Show TOC.

    Table of contents will be activated.

  • How to enable the Welcome screen in photoshop cc?

    With photoshop the new se update. The home screen has disappeared and I wanted it back. I found it very useful with some of my drawings. How to enable the Welcome screen?

    And just to clarify: Welcome screen has been replaced by the workspace of departure, completed by the advice that the Welcome screen was (although I admit that's exactly as good).

  • How to display the result of a java class in InputText?

    Hi all
    How can I get the result of the java classes to InputText or OutputText?
    also everyone in the forum can road map me to deal with Java in oracle adf because I am a beginner in oracle adf
    I saw a few samples in corner of oracle adf, but it is difficult for me.

    I use JDeveloper Version 11.1.2.3, technology of the Adf.
    My question is how to return the result of java Bean InputText or OutText
    Thank you

    see if you want to have show some .so beans instance variable value you can have a few bean .define managed a variable as
    string abc = "abc";

    create the getter set for her.

    in the value property of inputText or OutPutText write an el as #{beanscope.managedbeanName.abc}

Maybe you are looking for