Execute JavaScript from Item Region Button

How do I execute a JavaScript using a button displayed among this region's items?
When I create a "button in a region position", I am given the "Optional URL Redirect" which can be used to specify the JavaScript as the URL Target. This option is not available when the button is created to be displayed among the region's items - and I don't understand why there is this limitation on Item Level Buttons.

Scott,
I have no idea how I got this new OTN Id? Tell me what you know!
I signed on using what I believe is my regular Email Address, but I am no longer attached to the old OTN Id. And I no longer have the gold medal next to my name. Isn't that sad :(
I really ticks me that we are still (after how many years with Oracle) unable to change our Email Address and keep the same account. What is that with Oracle? Can't anyone teach those people good design (like don't use an externally supplied key as the internal identifier for your customer). I recently sold my Web Domain, and so my Email Address will soon change. The new owner is allowing me to keep my Email Address until Feb 2008.

Similar Messages

  • Execute javascript from plsql in a dynamic action.

    Is it possible to execute javascript with htp.p from a plsql block in a dynamic action (on change).
    I have tried it but I get a JSON error.
    The reason I want to to this is:
    I have to check something with plsql and depending on the result I want to do something in javascript.
    I now going to try it with ajax from javascript, but if somebody has a other way to do this i like to hear it.
    Thanks,
    Fred.

    Very neat, many thanks.
    I now have a 'Set Value' 'Javascript Expression' action of 'this.triggeringElement.id;' to set a hidden *but unprotected* page item. This is followed by the 'Execute PL/SQL' action which simply calls a package procedure and passes the name of the triggering item. The procedure then sets the session state(s) as required.
    Thank you!

  • Unable to execute javascript from backing bean

    Hello experts,  I want to execute  javascript function from backing bean method.   
    In my .jsff  page,  I have added  the javascript as :
    <jsp:root  ..... >
    <af:resource type="javascript" >
              function fileDownloadJS() {
                                alert(" tesing js from backing bean");
        </af:resource>
    </jsp:root>
    in my backing bean method  :
    public void callJSfuntion(ActionEvent actionEvent) {
            RenderKit rk = FacesContext.getCurrentInstance().getRenderKit();
            ExtendedRenderKitService erks = (ExtendedRenderKitService) Service.getService(rk, ExtendedRenderKitService.class);
            erks.addScript(context, "fileDownloadJS();");
    I have table in my .jsff page,   inside table column,  I have command link  and when I click the link,   I am invoking bean method  :
    <af:table  ....>
        <af:column sortProperty="title" sortable="true"  
                           headerText="File name" width="250px" id="Title"
                           clientComponent="true">
                  <af:commandLink   id="cl1"    actionListener="#{MyBean.callJSfuntion}" clientComponent="true">  
                    <af:outputText value="#{row.title}" id="ot1"/> 
                  </af:commandLink>
         </af:column>
    .</table>
    But when  I  run my taskflow and  click on  the link inside the table column,    JS function is not invoked.
    Absolutely  no clue what  is the issue.
    Appreciate if you can  help me out to resolve this issue.   Thank you.

    For debugging purpose can you try :
    <script type="javascript" >
              function fileDownloadJS() {
                                alert(" tesing js from backing bean");
    </script>
    put it on top of the page and let me know what happens.
    If it doesn't work try writing the function itself in your addScript(context, script); to see if it works.

  • [AS & JS] [CS4] Execute javascript from actionscript

    Hi,
    I've written a folder action in Actionscript to open a Indesign file. I would like to execute a javascript that a wrote before. Is it possible to launch a javascript from within a actionscript? Does the actionscript wait to continue until the javascript is completely executed?
    Thanx
    John

    Scott,
    I have no idea how I got this new OTN Id? Tell me what you know!
    I signed on using what I believe is my regular Email Address, but I am no longer attached to the old OTN Id. And I no longer have the gold medal next to my name. Isn't that sad :(
    I really ticks me that we are still (after how many years with Oracle) unable to change our Email Address and keep the same account. What is that with Oracle? Can't anyone teach those people good design (like don't use an externally supplied key as the internal identifier for your customer). I recently sold my Web Domain, and so my Email Address will soon change. The new owner is allowing me to keep my Email Address until Feb 2008.

  • How to run javascript from Item Button?

    How to make an Item Button to run a javascript?

    Specify custom URL target as : javascript:yourFunction().
    Alternatively, specify item attributes:
    onclick="yourFunction()"
    Ta,
    Trent
    Edited by: trent on Nov 25, 2010 4:39 PM
    typo

  • Execute Javascript from our JAVA code

    Hi all,
    I have a question:
    It's possible to execute a javascript code from the back bean page. For example , we execute a button action (Conect to a db, insert data) and if all it's ok we execute a simple alert ("The insert is ok!!");
    Any way to do this??
    Thx!

    I don't know enough about Javascript, but I don't think it can be executed from within Java code.
    If you can't, an alternative is to provide a status code and/or status message that is accessible to the page. There are a number of ways to do this. One option is to put the information in a hidden field. Another option is to put the information in a session bean and add appropriate JSP code to your page to get that information.
    You can link a Javascript function to the page's onLoad event. The function can get the status code/status message and create the alert.

  • Using a Java Program to execute JavaScript from a website

    Okay, let me try and explain as good as I can. I have a program now, that searched through all files and folders in Unix (Solaris machine) and gets the list of files in the bin and sbin folders.
    Well, I want to find the version of each of these files from the bin and sbin folders and not all of them have the -v, -V or -version feature (or any others there may be). But, I found this page:
    http://sunsolve.sun.com/pub-cgi/fileFingerprints.pl
    where if you go to the page I can find an md5 number, place it in the box and click submit to find versions, if available.
    My thing is, as I find the number from my java program, I want to be able to open this page, insert in the box (or maybe even call the javascript function) and then submit to get the version numbers. That would mean I could need to get back info from the javascript function.
    I hope that explains what I need and hope that someone can help me.
    I have found information on the JSObject, but not sure what that means exactly so if someone can explain this:
    JSObject win = JSObject.getWindow(this);
    JSObject doc = (JSObject) win.getMember("document");
    JSObject loc = (JSObject) doc.getMember("location");
    String s = (String) loc.getMember("href"); // document.location.href
    win.call("f", null);     
    it would be greatly appreciated. But, this may not even be what I need. I see that the win.call is where I would call the function needed and I am guessing the null could be where I put the number if that is how the function i need works like that. But, what I dont understand is what "document" is and "location". Also, i the "href" the page I put above? I am just lost on that. Hope someone will understand.
    Thank again for the help!

    Exactly so. Check out the last item - reading and writing to a URL - writing to a URL.
    Pulling out the form code from that page:
    <FORM METHOD="POST"  ENCTYPE="application/x-www-form-urlencoded">
    <TEXTAREA NAME="md5list" ROWS=16 COLS=66 MAXLENGTH="33792"></TEXTAREA>
    <BR><INPUT TYPE="submit" NAME="submit" VALUE="submit">
    <INPUT TYPE="reset" VALUE="reset">
    </FORM>You should end up with something like this (copying and pasting from the example):
    URL url = new URL("http://http://sunsolve.sun.com/pub-cgi/fileFingerprints.pl");
    String sNumbers = "put your serial nos in this string"
    URLConnection connection = url.openConnection();
    connection.setDoOutput(true);
    PrintWriter out = new PrintWriter(connection.getOutputStream());
    out.println("md5list=" + sNumbers);
    out.close();
    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null){
      // read in the HTML page result for later parsing?
    in.close();

  • Executing Javascript with button

    How can I go about executing javascript with an item level button?
    In the HTML DB 2 day tutorial it says this:
    Calling a JavaScript from a button is a great way to confirm a request. Oracle HTML
    DB actually uses this technique for the delete operation of most objects. For example,
    when you delete a button, a JavaScript Alert Box appears asking you to confirm your
    request. Consider the following example:
    <script language="JavaScript1.1" type="text/javascript">
    function deleteConfirm(msg)
    var confDel = msg;
    if(confDel ==null)
    confDel= confirm("Would you like to perform this delete action?");
    else
    confDel= confirm(msg);
    if (confDel== true)
    doSubmit('Delete');
    </script>
    This example creates a function to confirm a delete action and then calls that function
    from a button. Note that the function optionally submits the page and sets the value of
    the internal variable :REQUEST to "Delete," thus performing the delete using a process
    that conditionally executes based on the value of request.
    Note that when you create the button you would need to select the Action Redirect to
    URL without submitting page . Then, you would specify a URL target such as the
    following:
    javascript:confirmDelete('Would you like to perform this delete action?');
    Can I only do this from a region button?

    hi,
    I have created a javascript form validation and finally (if its passes the validation) I am setting the :REQUEST as doSubmit('GO');
    I am calling a conditional process with condition as request = expression1
    with expression 1 as GO.
    The javascript is as follows
    function message_name_not_null(){
    if(document.getElementById('P14_MESSAGE_NAME').value.length==0)
    alert("Message Name is Mandatory!!");
    return;
    else if(document.getElementById('P14_MESSAGE_TEXT').value.length==0)
    alert("Message Text is Mandatory!!");
    return;
    else
    doSubmit('GO');
    My problem is my process is not getting called in button click(I have called the javascript from this button as javascript:message_name_not_null(); in Optional URL Redirect section)
    I have specified the :REQUEST value in the branches also.
    Any sort of help please..
    Thanks in Advance
    Kaushik

  • 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.

  • Webkit. How to connect external javascript from dir C:

    I can't execute javascript from dir C:
    I have some html, that I load in Webkit with loadContent(). In that html invoked function test(). Function contains in a separate javascript file.
    <head>     
    <script language='javascript' type='text/javascript' src="file:///C:/temp/test.js"></script>
    <script>
         function getText() { var val = document.getElementById('text_area').value;
              prompt('getText', "val");
    </script>          
    </head>
    <body>
           <textarea id='text_area' name='text_area' style="width:100%; height:100%"></textarea>     
           <script> test(); </script>
    </body>External javascript (test.js)
    function test() {
            alert('It works!');
         getText();           
    }External js doesn't work. PromptHandler (AlertHandler) doesn't catch anything. If I use wEngine.executeScript('test'), appear error: netscape.javascript.JSException: ReferenceError: Can't find variable: getText.
    But that code works on any other browsers.

    Thank you for the problem report!
    This looks like a bug in WebView. A Jira issue has been filed to track this: http://javafx-jira.kenai.com/browse/RT-17330. Note that the issue may end up classified as not-a-bug because the ability to run local scripts from dynamic contents may be considered a security hole.
    As a workaround, try saving your HTML into a temporary file and load it using WebEngine.load(). It should work as in any other browser. Another option is to include all necessary code in the HTML document loaded with WebEngine.loadContent(), but I gather that is undesirable in your case.
    Edited by: 890759 on Oct 11, 2011 5:19 AM
    Edited by: 890759 on Oct 11, 2011 5:21 AM

  • Execute query from report

    Hello,
    I would like to have a report wich contains a checkbox and a description. Depending on the checkboxes checked, the corresponding queries (stored in the same table, and for each description) should be executed and display the result on another page. The queries should be executed as from clicking a button.
    I have 2 question:
    1. how should I handle it for executing a query stored in a table? is it just report type sql query or something else...
    2. how can I know the exact lines (depending on the checked checkboxes when clicking the button?
    Thanks in advance!
    Regards,
    Sofie

    I'm first trying to count the checked boxes, to see if it is really doing the right thing.
    HTMLDB_APPLICATION.G_F01.COUNT counts the checked ones, right?
    so in my process i have:
    begin
    if HTMLDB_APPLICATION.G_F01.COUNT is not null then
    :P80_TEST := HTMLDB_APPLICATION.G_F01.COUNT;
    end if;
    end;
    but nothing is displayed in the field P80_TEST...
    what is wrong?
    Regards,
    Sofie
    PS: this seems to be a topic only for me :-)

  • Session state of page item different from one region to another region

    hi,
    on one particular page I have two regions. A page item (LOV pop-up) is set in the first region. I leave this region with a button and jump back with a branch to the same page. The page item has now the selected value (as is shown by session state window). So far so good.
    The second region (SQL query type) uses this page item. However, for some reason the page item is NULL in that second region.
    Can anyone explain this behavior ?
    ron

    thanks Joel,
    I did already what you suggested. The title in region 2 is evaluated to the same value as in region 1.
    The SQL query (that actually runned with identical syntax before) is:
    select bla from blatable where bla = :P920_RU
    this generates:
    report error:
    ORA-12801: error signaled in parallel query server P000
    ORA-01741: illegal zero-length identifier
    So apperently the bind variable is evaluted to (or cached as) NULL.
    I noticed something strange in the session window. There are several page items in the application. All of them are listed in the 'Session State' region. The page item that makes problems is the only one that is also listed in the 'Page Items' region. It is even listed when I start the session window from another page. Weird.
    any other ideas ?
    Actually, how could you possibly clear session state between rendering two regions ?
    Ron

  • Execute JavaScript and Button

    Hello Forum,
    I have a project anomaly. I have created about ten captivate
    projects, all using a similar (almost identical) menu system.
    This is basically an ending slide with three buttons on it.
    One button has an Execute Javascript action tied to it. my code
    there is a function to open a separate browser window when the
    button is clicked. I wrote the function to open the window in the
    "standard.js" file that Captivate publishes. I am using Captivate
    3. In 8 of these projects, when the button is clicked it opens the
    browser window.
    In two of thses projects the button makes a nice click sound,
    I see a quick screen/window flash, but no new browser window!
    Same button same code same standard.js file.??? I checked a
    button that works, and compared its properties to one that does not
    work, they all have the same numbers, etc. I gave up.
    Then I copied a button that works from an app that works, and
    copied that button on to the project where the button did not open
    the window. Deleted the "bad" button, revised the link address in
    my call to the function: wopen("
    http://info.mysite.com"); and
    this works!
    I have been using the standard Text button for these apps.
    Any ideas on this one??? the publishing for the programs is
    all the same (Flash Player 9, etc)
    Thanks,
    eholz1

    @Erickj:  Either do what Rod stated (adjusting your Flash Security settings) or test your content from a true web server.  Flash automatically trusts content coming off a true web server where the web address begins with http or https and ends in .htm or .html. 
    The nice thing about Cp 7 is that it has a built-in web server so you don't run into issues like this when testing your content.

  • Open and pass value to page 2 from page 1 using region button

    Good day,
    I created 2 pages. I have created a text item called p_employeeid in page 1 and a region button with button action redirect to page 2. When i click the button i can open page 2 but i cannot filter the records that pertains only to p_employeeid. my source for page 2 is select * from test_tbl where employeeid = :p_employeeid.
    Help would really be appreciated. thank you.
    Mon

    hi trent,
    i created a branch as well. on submit after processing target type page in this application, page 2 and set this item p2_employeeid and value for this item &p1_employeeid. i did not select any in condition type but selected the button i created submit in the when button pressed. the action of my submit button is submit page.
    below is the apex url using button only without branches: only the value of p2_employeeid is not included in the url
    http://172.16.10.10:8080/apex/f?p=103:2:872957668524402::NO:2:P2_EMPLOYEEID:
    this is with branching: no p2_empoyeeid nor the valu
    http://172.16.10.10:8080/apex/f?p=103:2:872957668524402::NO:::
    i notice that using the branching even p2_employeeid is not submitted whereas in the button ihave th p2_employeeid but no item value.
    I have googling and trying out samples but all i see are table columns with the edit icon. I have not seen example with text box with button calling another page. :(
    thank you for the assistance, if you can think of any other suggestion i would be willing to try them out.
    Mon

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

Maybe you are looking for

  • Iphone 5s not picking up home Wi-Fi and/or very poor signals even in downtown area

    Switched to Verizon and bought IPhone 5s less than 3 weeks ago. It was fine the first week then suddenly it won't recognized my home wi-fi and got very poor wireless signal. I have my old IPhone 4s and it works fine like a charm for wi-fi. It keeps r

  • Hi Toshiba members! FYI Here's a excellent guide!

    HI Toshiba members and guests. Here is a excellent place to start trouble shooting when your PC won't boot windows. I'm still waiting for these to become sticky's. I'm about to give up on staff. I guess if they made it to easy, you might not need old

  • How to resolve RMAN:06172

    Hi All, This is my first thread. I am junior Oracle DBA and recently I was told to do a RMAN restoration from a set of backup files which consists 1CT & 5DF files. This back up was taken at some other region. I created a database to restore the files

  • Problem Compiling Samples - Xcode 3.2.4 (OS 10.6.5)

    When I try to compile any of the sample plugins in Xcode I get the following errors.  I'm not quite sure what's wrong with my setup.  I've scoured the forums looking for information on this but cannot determine the problem.  Does it have something to

  • Ovi Map not showing railway lines on N8 (UK map)

    Hi I've recently purchased a N8, and I was suprised to see the UK maps not showing the railway lines. However if I scoll across to Germany for example, the lines are clearly shown. They used to show up on my 5800 and show up on the Ovi maps website,