Getting Object Value in Java Script.

Hello,
I am having a Graph apprearing on my Browser, I have used the Web Templates for this.
When there the Query does not return any Data they Graph is not displayed and i get a message "No Application Data Found".
Is there any way for me to capture this Message is Java Script and make Hide this message and from the user, any help will be highly appreciated.
Best Wishes,
Venkat.

Sorry, this is a JSF forum, not a Javascript forum. There are JS forums at webdeveloper.com and dynamicdrive.com.
As you're posting this in a JSF forum, I suspect that you don't understand in depth how JSF and JS works. I would then tell you one very important thing: Javascript doesn't see anything from JSF, it only sees the HTML DOM tree which is generated by JSF. Open a JSF page in your webbrowser, do a 'view source', that's all what JS sees. You need to base your JS code on that generated HTML/CSS/JS source. Good luck.

Similar Messages

  • How to get the value in java script to JSP

    Hi,
    I have written an onclick function on each row and passing the primary key of the table to the javascript function. I want the value which I have passed to the javascript back in the jsp to delete the particular row. How can I achieve this.
    Thanks

    Thank you for your reply!! Here I am getting the values only into the javascript after I click a particular row in the table. So for the bean and action to get that particular vale I think I have to submit the form and then get the values back because its initially showing null. How do I submit the form and get the value back, so that I can delete particular row?

  • How to get/read region item value in java script

    Hi All,
    i have text item on a page.
    how to read the item value in java script
    EXAMPLE
    P10_RESULT IS ITEM IT HAS VALUE "38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888"
    NOW I WANT TO REFER ABOVE ITEM VALUE IN JAVA SCRIPT LIKE
    var myPoints=new Array(&P10_RESULT.);
    SO I CAN POPULATE ARRAY WITH CORDINATES
    IT IS NOT WORKING
    WHAT IS THAT I AM MISSING.
    PLESE HELP .
    ThankS
    Rk

    region header code....
    <script src="http://maps.google.com/maps?file=api&v=2&key=&API_KEY." type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    //globals
    var bounds = new GLatLngBounds();
    var map;
    var centerPoint = new GLatLng(38.984898,-76.854549);
    var gmarkers = [];
    //var x= ""38.956472,-77.447777","38.999123,-//77.026184","12.951497,70.668646","17.459075,78.456888"";
    //var myPoints=new Array(x);
    //var myPoints=new Array($x('P10_RESULT').value);
    var myPoints=new Array(document.getElementById('P10_RESULT').value);
    //var myPoints=new Array("38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888");
    function initMap()
              doLoad();
                        addMarkers();
    function doLoad()
         if (GBrowserIsCompatible())
                   map = new GMap2(document.getElementById("map"));
                   map.setCenter(centerPoint, 7);
                   map.addControl(new GScaleControl());
                   map.addControl(new GLargeMapControl());
                   map.addControl(new GMapTypeControl());
    function myclick(i) {
    GEvent.trigger(gmarkers, "click");
    function addMarkers() {
         if (myPoints.length) {
              var bounds = new GLatLngBounds();
              for (n=0 ; n < myPoints.length ; n++ ) {
                   var mData = myPoints[n].split(',');
                   var point = new GLatLng(mData[0],mData[1]);
                   bounds.extend(point);
                   var marker = createMarker(mData[1],point, mData[0]);
         map.addOverlay(marker);
              map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
    function createMarker(i,point, title) {
         var marker = new GMarker(point,{title:title});
         GEvent.addListener(marker, "click", function() {
              marker.openInfoWindowHtml('<div style="width:250px;">' + title + '<hr>Lat: ' + point.y + '<br>Lon: ' + point.x + '</div>');
         gmarkers[i] = marker;
         return marker;
    //]]>
    </script>
    page body code
    onload="initMap()" onunload="GUnload()"

  • How to get h:inputText  value into java script

    I have 3 date input fields when the page loads first time those fields values are "null" and by default i am putting with some dates by using onload function
    function runOnLoad()
         var v1 = document.getElementById(document.getElementById("recordedDateProxy").value);
         var v2 = document.getElementById(document.getElementById("mystartingDateProxy").value);
         var v3 = document.getElementById(document.getElementById("myLastDateProxy").value);
         var v4 = document.getElementById(document.getElementById("reportsTypeProxy").value);
         if (v1 == null && v2 == null && v3 == null && v4 == null)
    setDate();
              setTwoDate();
    then,i am putting one date and making remaining two dates null (i.e disable two dates) when the page loads second time it was giving all the date fields null. But i know there is a value in one date field. but it was not taking that value so it was again calling setDate();
    setTwoDate();
    please help me

    no there are only 3 date fields and laso one is a radio button value. what i am doing is
    I have a jsp page in that 3 date fields are there and two radio buttons one is day type and one is month type if i choose day type radio them two date fields disable if i choose month type them first date field disable. ok
    i have a button which get reports and print them in the same page so when the page loads first time then u can see in first date field todays date and remaining two date fields fill with starting date and ending date ok because i am calling onload function in onload function i an getting the values of these fields when those are null them fill with dates
    after fetching the records page loads again and calling inload function again then it was againg taking all the fields null it was not taking the date what i have enterd thats y it was again putting the dafault values

  • Setting the XML tag value in Java script

    Hi,
       I am trying to set a XML tag value in the initialize event of a text field.. The code works fine in FormCalc but I needed it to work in java script.
         FormCalc:
         $record.prospectApplication.typeName = "namedInsured";
         Java Script:
         xfa.record.prospectApplication.typeName = "namedInsured";
         The above JavaScript does not work. Can any one help on this?
    Thanks
    Srini

    Hi Srini,
    In JavaScript you don't get any default properties so you need to say;
    xfa.record.prospectApplication.typeName.value = "namedInsured";
    That is assign the value to the "value" property not the dataValue object.

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • Getting error in calling Java Script function in HTMLB page

    Hi
      I am having a button in HTMLB page which calls the Java Script function for click event.I have included the Java Script in the script folder of the application.
    I am calling the function present in JS like this,
    <SCRIPT src="portalsdc.js"></SCRIPT>
    function buttonClick() {
    someFunc()
    <hbj:button
    onClientClick="JavaScript:buttonClick();"
    disabled="false"
    design="STANDARD"
    />
    The Error i am getting in calling someFunc()is "Object Expected " ..
    Any suggestion how to make it work.
    Thanks in advance
    Saravanan

    Hi,
    My code in page is
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
    <hbj:page title="Epcf iView" >
    <SCRIPT src="portalsdc.js"></SCRIPT>
    <script language="JavaScript">
    function buttonClick() {
         someFunc()
    </script>
    <hbj:form>
    <hbj:button
    id="sendEvent"
    text="Send event"
    width="125px"
    tooltip="This button raises an event ..."
    onClientClick="JavaScript:buttonClick();"
    disabled="false"
    design="STANDARD"
    />
    </hbj:form>
    </hbj:page>
    </hbj:content>
    The code in Java script portalsdc.js is :
    function someFunc()
         alert ("HI");
    Even i have set and tried jsObjectNeeded = TRUE for button.
    Thanks and Regards,
    Saravanan

  • Round value in java script

    hi,
    I have to calculate Salary into textfield .
    Problem is after Calculation salary amount 1230.3566678787 like this come into text field.
    i want only 1230.35 amount.
    <script>
    function multiplyItems(){
    function getVal(item){
    if($x(item).value != "")
    return parseFloat($x(item).value);
    else
    return 0;
    $x('P65_SALARY').value =getVal('P65_ADVANCE_PAYMENT')+
    getVal('P65_OVR_TM_AMT')+getVal('P65_BONUS') + getVal('P65_OTHER_CHARGES')-getVal('P65_LEAVE_AMOUNT');
    </script>How can i do this in java script.

    Change your code as below.
    <script>
    function multiplyItems(){
    function getVal(item){
    if($x(item).value != "")
    return parseFloat($x(item).value);
    else
    return 0;
    $x('P65_SALARY').value =Math.round((getVal('P65_ADVANCE_PAYMENT')+getVal('P65_OVR_TM_AMT')+getVal('P65_BONUS') + getVal('P65_OTHER_CHARGES')-getVal('P65_LEAVE_AMOUNT'))*100)/100;
    </script>Better if you post a javascript question in a javascript forum. Chances of getting a solution will be increased.

  • How to get return value from Java runtime.getRuntime.exec?

    I'm running shell commands from an Oracle db (11gr2) on aix.
    But, I would like to get a return value from a shell comand... like you get with "echo $?"
    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        return retval;
    /but I do not get a return value... because I don't know how to get return value..
    Edited by: user9158455 on 22-Sep-2010 07:33

    Hi,
    Have your tried pr.exitValue() ?
    I think you also need a finally block that destroys the subprocess
    Regards
    Peter

  • HT4623 I did the latest update to my i pad 2 and now Safari does not work properly . I get messages that the java script needs to be turned on which I did. How do I get this all back after this update?

    I did the latest update to my I pad 2 and lost Safari . I was instructed to switch the Java script on which I did but Safari is still not working properly . how do I get everything back after this software update.

    Try a reset: hold down the home button along with the power button until you see the Apple, then let go.

  • Whenever I use facebook I'm getting this error message [Java Script Application] Error: options is undefined whenever I click on a link. What can I do to fix this problem? Easy step by step instructions please.

    When I use facebook, I keep getting this message [Java Script Application] Error: options is undefined whenever I try to return something, click on a link, or message, open a game, etc. ... I have Windows 7, addons of greasemonkey and better facebook (which seems to have disappeared)
    == URL of affected sites ==
    http://www.facebook.com/reqs.php#!/?ref=home

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Getting return value from sqlplus script while running a unix job

    I am trying to run a unix script that calls sqlplus. The following code outlines the unix/sql code that I trying to execute:
    return_count=`sqlplus $ORACLE_ID/$ORACLE_PWD@$ORACLE_SID <<EOF | grep '^RETURN_VAL' | sed 's/^RETURN_VAL//'
    SET SERVEROUTPUT ON
    VARIABLE ReturnValue NUMBER
    EXEC :ReturnValue := 1
    BEGIN
    UPDATE seq_control_nbr
    SET table_seq_nbr = table_seq_nbr + 1,
    last_updt_dttmstp = systimestamp,
    last_updt_user_id = 'ECVMSONS'
    WHERE table_key = 'ONSTAR';
    IF SQL%ROWCOUNT = 1 THEN
    COMMIT;
    :ReturnValue := 0;
    ELSE
    ROLLBACK;
    :ReturnValue := 99;
    END IF;
    DBMS_OUTPUT.PUT_LINE ('RETURN_VAL '||:ReturnValue);
    END;
    EXIT
    EOF`
    The above outlined sqlplus script does run because the values on the table are updated. However, I cannot get the value of ReturnValue to be displayed, so it can be returned to the unix script.
    Any ideas?

    ok do the following:-
    return_count=`sqlplus $ORACLE_ID/$ORACLE_PWD@$ORACLE_SID <<EOF
    SET SERVEROUTPUT ON
    whenever OSERROR exit 1
    whenever SQLERROR exit 2
    UPDATE seq_control_nbr
    SET table_seq_nbr = table_seq_nbr + 1,
    last_updt_dttmstp = systimestamp,
    last_updt_user_id = 'ECVMSONS'
    WHERE table_key = 'ONSTAR';
    EXIT
    EOF`
    rowsupdated=`echo $return_count|cut -f1 -d' '`
    echo "Rows updated =" $rowsupdated
    retcode=`echo $?`
    case "$retcode" in
    0) echo "Update executed successfully on " ;;
    1) echo "Update failed OSERROR ";;
    2) echo "Update failed SQLError " ;;
    *) echo "Update failed - Unknown Error ";;
    esac

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • How do I get rid of the Java Script Application that keeps popping up and saying 'invalid XMC value'?

    Every time I click to add something to a message, this pops up. It is very irritating and I have no idea where or how it came from as it just started today.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for