Calling JavaScript from a SQL report?

I am using the HTMLDB_ITEM api's to build my report. I am trying to render a text item and append an image / hyperlink to the end of my textbox which links to a custom popup page.
I have all this working but I need to use a JavaScript call html_GetElement to pass into the URL I am building in the link.
e.g.
This query works fine and my popup page fires passing the value 'ABC' into the element P323_PIN on the popup page 323.
<br><br>
SELECT HTMLDB_ITEM.text (01, NULL, 10, 25)
||
'<ah ref="javascript:html_PopUp(''f?p=&APP_ID.:323:&APP_SESSION.::::P323_PIN:ABCD'');
">Link</a>' pin
FROM DUAL;
<br><br>
PS the hyperlink tag has been broken so it will display in the forum.
<p>I would link to replace this with the value (if any) that the user types into the textbox (01).
Any suggestions as I cannot seem to concatanate the right value into my url string. I think it is due to the quotes but I cant see the wood for the trees at the moment.
Regards
Duncan
Message was edited by:
Duncs

If the at line selections is getting fired then just use this option to call the url,
REPORT  zkb_test4.
DATA: v_str(60) TYPE c.
AT LINE-SELECTION.
  DATA: v_url TYPE string.
  v_url = v_str.
  CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
      document               = v_url
    EXCEPTIONS
      cntl_error             = 1
      error_no_gui           = 2
      bad_parameter          = 3
      file_not_found         = 4
      path_not_found         = 5
      file_extension_unknown = 6
      error_execute_failed   = 7
      synchronous_failed     = 8
      not_supported_by_gui   = 9
      OTHERS                 = 10.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
START-OF-SELECTION.
  v_str = 'http://sap.com'.
  WRITE / v_str.
  HIDE v_str.
Regards
Kathirvel

Similar Messages

  • Hyperlink from PL SQL Report to a branch

    Hi,
    Is there a "good" way to hyperlink from PL SQL report to a branch?
    I cant use the regular report, as there is a lot of data and I need to control the layout.
    I would like to go to another page and pass data to one known field.
    Have tried googling and I found this page:
    http://www.lucidprocess.com/blog/building-hyperlinks-in-oracle-apex-reports/
    But it seems a bit "hacky", eg.. many places to edit if the page where to move or change in the future (or if one copies the page).
    Is there a more "clean" way to do this, or does one have to get his/her hands dirty for such a task?

    Thank you.
    I managed to write the other code too:
    "f?p='||:APP_ID||':686:'||:APP_SESSION||'::'||:DEBUG||'::P686_TBNR,P686_VIS_REGISTER:'||oppdrag.PE_TBNR_BET||'%2CHUSKNYTT"instead of firing the branch and using JS, I just set the two fields that change the logic and basis of the page. However as you see, the "flaw" with the code I wrote, is that if the fields or anything were to change, it will be harder to go in and edit reports that have this type of code.
    Have just started with APEX, but I must say I like it a lot..
    Just wish there where something inbetween the sql reports and the pl sql reports..
    The possibilities of the PL SQL Reports meeting the SQL Reports flexibility would be super.
    However, maybe it's good not everything is served on a plate, as this forces me to learn it more in depth. I also love challenges and I like making things properly :-)

  • Calling Javascript from JApplet

    Does anyone know of a foolproof way of calling Javascript from an Applet on a Web page. I have heard of the JS Object but can't find much aboout it. Does anyone have any ideas?

    or...
    http://turtle.ee.ncku.edu.tw/~zulu/research/seminor02/
    http://turtle.ee.ncku.edu.tw/~zulu/research/
    JRG

  • Advantages and Disadvantages of calling java from PL/SQL

    Hi,
    I have one doubt. What are all the advantages and disadvantages of the calling java from PL/SQL?
    In actual scenario the java program will be in the Application server side. It will do the operation and it will store the result in Data base. But in this case (calling java from PL/SQL), we are loading the java program in the Data base and it is doing the operations.
    I have seen many posts are coming regarding loading jar files into the database. Actually the jar will deploy in to Application server. Is there any difference instead of keeping in the Application server side?
    Then I have read,
    advantages:
    -> java having lot API's. so PL/SQL can use that API's.
    -> if we can not do anything in PL/SQL. we can do it using this mtd(calling java from PL/SQL).
    My questions:
    -> could you explain what are all the things we can not do but we can do using "calling java from PL/SQL" method?
    -> is there any other advantages?
    Disadvantages:
    -> the performance is very slow in calling java from PL/SQL.
    My questions:
    -> Then why others are loading java files and jar files into database?
    -> is there any other disadvantages?
    Could you explain about this one? It will be more helpful to others also…
    Regards,
    kk

    Hi,
    You can read the free first chapter of my book @ http://www.amazon.com/gp/product/1555583296/ (see details then Excerpt)
    Kuassi http://db360.blogspot.com

  • Call php from PL/SQL

    Hello !
    i want to call PHP from PL/SQL(procedure).
    Is it possible .
    If yes then how.
    if no then is there any other way to do it.
    Regards
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Michael Kleiser ([email protected]):
    Look at this: http://www.oracle.com/oramag/code/tips2001/index.html?021201.html
    It`s a java-function which calls a os-command.
    I haven4t testet it.
    In this forum http://www.dbasupport.com/forums/showthread.php?threadid=3703
    someone asked the same question as you.
    I hope this helps you.<HR></BLOCKQUOTE>
    I've tried the tip above without success. Has anyone got it to work?
    null

  • Calling javascript from 10g Forms

    Hi,
    RE: How do I call Javascript from Forms 10g (v 10.1.2.0.2)
    Sorry if this post is to the wrong audience but was wondering (as I haven't had an update from the Forms forum) if anyone could tell me how to know
    when a user was navigating away from the current open form because they had entered a new URL in the address bar and were trying to navigate to it?
    The reason for this is that i would want to prompt the user to confirm that they wanted to exit the form as potentially they would have a record (in the form)
    flagged as being updated and as such no other user (including themselves) could susbequently access it.
    So, I'm basically wanting to know if there is a way (by using Javascript?) to catch the fact that the user is about to navigate to another web page.
    Kind regards,
    Tom

    Hi John,
    Well, I'm chasing my tail about this one as not getting any response from any area.
    Apart from the Oracle Forms forum, any other one that you would suggest?
    Kind regards,
    Tom

  • How to pass a bind variable from one SQL Report to Another

    Hello~
    I've created a link on one SQL Report page (Page 1). I would like a value from Page 1 used in the SQL on Page 2 to determine the result set. The Where Clause in SQL Query containing the bind variable is as follows:
    AND hp.party_name     = ':District_Account'
    When I run Page 1 and click on the link to execute Page 2, I get 'No Data Found'. The setup of the link is as follows:
    Column_Name = District_Account
    Link Text = #District_Account#
    Target = Page in this application
    Page = 2
    I'm a rookie working in V1.6...any help would be greatly appreciated!
    Thanks,
    Becky

    I don't see any parameter being passed in that URL. A little sample: http://htmldb.oracle.com/pls/otn/f?p=33203:4<br>
    when you click on the edit link the URL looks like this:<br>http://htmldb.oracle.com/pls/otn/f?p=33203:5:16073998852455071705::NO:5:P5_TABLE_NAME,P5_OWNER:PRESIDENTS_THEMES%2CBLUETEST<br><br>
    where P5_TABLE_NAME and P5_OWNER are the items and PRESIDENTS_THEMES and CBLUETEST are the values.<br><br>
    The SQL on the filtered report looks like:<br>
    SELECT *
    FROM all_tab_cols
    WHERE table_name = :P5_TABLE_NAME
      AND owner = :P5_OWNER<BR><BR>

  • "ReferenceError: "myIpAddr"  is not defined, when call JavaScript from java

    Hi developers,
    My java application was trying to issue a http request via proxy auto-config. So, I did below jobs
    1. Read URL of *.pac from registry
    2. Call FindProxyForURL from java, the code is like below
                   ScriptEngineManager factory = new ScriptEngineManager();
                   ScriptEngine engine = factory.getEngineByName("JavaScript");
                   engine.eval(autoProxyScript);
                   Invocable inv = (Invocable) engine;
                   Object obj = inv.invokeFunction("FindProxyForURL",
                             "http://java.sun.com/",
                             "java.sun.com");
    However, I got "ReferenceError: "myIpAddress" is not defined
    I can not change the script on server to add a function like "myIpAddress", I am wordering why IE or mozilla can call it successfully and get proxy server, while Java failed to do that.
    I got a ugly solution by calling "pacparser" by jni. But I really hope I can get a better solution.

    A .pac file is a JavaScript, but it requires some functions to be defined in the executing context to work (i.e. you must define those).
    From the example on the Wikipedia page there's at least "shExpMatch" and "isInNet". "myIpAddress" seems to be another such candidate.

  • Call RFC From PL/ SQL

    Hi Everybody, i have some question:
    Its Possible from PL / SQL, call RFC Functions?...
    Please can you give me some examples or tell me if is technicaly impossible to do that?..
    Thanks a lot.
    Greattings
    Wilmer Figueroa

    Hey,
    It is not that easy,
    SAP didn't published an package to link PL/SQL to RFC,
    however, it is possible with some work:
    the PL/SQL can execute command on operation system of the DB
    for example 'dir' in windows or 'ls' in unix,
    instead of running dir/ls you can execute a program that will execute an RFC in the SAP system.
    the program can be developed by .Net connector, see:
    NW RFC SDK - is there a guide somewhere?

  • Calling WS from PL/SQL using WS-security

    Hi All,
    Has anyone experience with calling a Webservice from PL/SQL and use WS-security to encrypt the contents? If not; maybe with java stored procedures in 9i? (in other words: using WS-security without JDeveloper).
    with regards,
    Michiel Kuperus

    Right now what you can do is use SSL via the Java stack calling Web services ... the "call out" examples at:
    http://otn.oracle.com/tech/webservices/database.html
    show how under a PL/SQL wrapper the same java web services runtime from the middle tier running in the DB can invoke Web services. That stack supports SSL. It does not currently support WS-Security which is an emerging spec from the OASIS standards body.
    Oracle, however, is currently working on building WS-Security into its Web services stack. This is however,a post-9.0.4 (the upcoming release of Oracle9iAS) project. Bear in mind that WS-Security is still an evolving standard and while there are some early implementations they will evolve over time as the spec itself solidifies.
    Mike.

  • Calling Javascript from ABAP webdynpro application

    Hai All,
    I want to call a Javascript from ABAP-Webdynpro application. If anyone has done this. Please let me know.
    Thanks & Regards,
    H.K.Hayath Basha.

    go to window
    create suspend outbound plug and resume inbound type
    when create an outbound plug of Suspend type a parameter Url is automatically created,
    fire the outbuond plug with the Url to a BSP page where you have JavaScript.
    and fromt he BSP navigate back to WDA again which you can do using by reading the url parameter sap-wd-resumeurl, which contains the WDA URL
    Abhi

  • Calling javascript from a button

    Good morning everyone!
    I need to add a message box that asks the user a confirmation to delete information. So I want my delete button to call the javascript necessary to confirm the delete and then delete.
    My problem is in calling the javascript. I'm able to do so by using an image for my button and in the image attributes add:
    onclick="javascript:confirmDelete('Are you sure you to delete?');"
    This works perfectly, except for one thing: I don't want to use an image for the button. It doesn't fit with the rest of the application.
    I know it can work, because Oracle is using it on this page:
    http://apex.oracle.com/pls/otn/f?p=37719:8:3069181226556730::NO:::
    So how can I call my javascript from an ordinary button?

    I have a related question:
    How can I access the BROWSER_LANGUAGE in javascript? With my method of calling javascript, I didn't find a good way to pass variables to the function that I call.

  • Call rules from PL/SQL

    Hi,
    I have ruleset and it being called by RL function.
    Is it possible that I can call that rules or rule function from PL/SQL, if yes could you please help me with some ideas. (without involving BPEL)
    Thanks
    Sreejit

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Michael Kleiser ([email protected]):
    Look at this: http://www.oracle.com/oramag/code/tips2001/index.html?021201.html
    It`s a java-function which calls a os-command.
    I haven4t testet it.
    In this forum http://www.dbasupport.com/forums/showthread.php?threadid=3703
    someone asked the same question as you.
    I hope this helps you.<HR></BLOCKQUOTE>
    I've tried the tip above without success. Has anyone got it to work?
    null

  • Call  ABAP From a Web Report

    Hi All,
    Can anyone pls tell me how can we call an ABAP report from a WAD report.
    We have a requirement that is when we click on a tab in a WAD report it should go to the system and execute a ABAP Report.
    Pls reply ASAP.
    Thanks
    Kapil

    Hi All,
    There is a small change in the requirement..
    I'll brief you with the entire scenario again.
    We have a reporting requirement that we were not able to achieve through BEx or WAD. So we decided to write a ABAP report for this. Since all the other reports are made in WAD.. we want this report also to be executed through WAD ie. when we execute this particular Web Template it should actually take us to the system and execute the ABAP report.
    Pls give your suggestions on achieving this.
    Thanks
    Kapil

  • How to call javascript from java application

    How can we call a function written in javascript from java application (core java not applet)? How will java identify javascript?
    Is there any such options ?

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

Maybe you are looking for

  • Which is better String null or should i initialize to blank ?

    Hi I am persisting one string in coherence which can be null for few cases. so putting null or blank which is better in coherence ?

  • Which computer

    OK everyone... I am having a tough time deciding what computer to get. I narrowed it down between 2. A 15" Powerbook G4 and the 20" iMac G5 (the model right before the built in isight.) Help me decide. Do I want the 2.0 ghz G5 with a 20" screen or do

  • Can't connect to bluetooth earpiece

    Hello, i'm having trouble connecting to bluetooth earpiece. i had the 3gs and was using the jabra earpiece. it synced fine with the 3gs. is there a trick to getting it to find the 4s?

  • Font Management Guidance

    Just installed CS4 for Windows. Currently using Extensis Suitcase for Windows (v11x). I don't believe that the "auto activation" feature works with CS4. What type of font management program that incorporates that type of feature would you folks recom

  • Connection problem in canada.

    Hello. I have huge problem with my blackberry z10 device. I bought my device six months ago from Greece which mostly I live there and they told me that this device is unlocked. I used my device with most of all three mobile networks in Greece and it