0 Replies Latest reply: Sep 18, 2013 4:11 PM by Clarkec21 RSS

    Forms 11g: web.javascript_eval_function - help

    Clarkec21

      Hi

       

      Can anyone help a javascript novice understand Oracle Forms web.javascript_eval_function

       

      I am opening a new blank window and want to write to that window "Hello World!" using javscript.  This is all part of a proof of concept for integrating some 3rd party software.

       

      My curent code (WBP trigger on a form button) is as follows:

      DECLARE

      l_window VARCHAR2(32000);

      BEGIN

        l_window := web.javascript_eval_function('window.open("","_blank",

        "toolbar=yes, location=yes, directories=no, status=no, menubar=yes, resizable=yes, scrollbars=yes, width=400, height=400")');

      EXCEPTION

        WHEN OTHERS THEN

          RAISE;

      END;

       

      Opening the window works fine but I now want to write "Hello World" in that new window.  I have a populated 'l_window' variable (the window object) how do I use this to say 'write here'?

       

      If I add web.javascript_eval_expr('document.write("<p>Hello World!</p>")'); then this runs in my Oracle Forms browser window as I have not specified the target argument.

       

      How do I get and specify this target argument?

       

      Thanks