In jsp how to extract the value from a name obtained from javascript?

It's few time i program in Java and i'm involved in an application that uses javascript to communicate between pages. I've the follow problem: in my jsp page i must process a string, but this string is produced from a javascript function. But in jsp, out of javascript function, how can i access to the value of that string of which i see from Javascript only its name?

My string is already in a form, but i have not the request because data transmission happens through javascript: i've tried to write
request.getParameter("StringName")
and i've not found compilation mistakes but in execution the application gives error (maybe it doesn't find the request in the caller page)

Similar Messages

  • How to extract the values from WPBP table

    Hi experts,
    We are in preparation of a custom report.
    In the report we want to have a  value from WPBP table.
    We want to extract the value of Capacity utilization level from WPBP table.
    Could you please let me know the way to extract the value.
    Please advice.
    Regards,
    Sairam.

    Hi Sairam,
    Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
    So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
    Regards;
    Okan

  • How to get the value of a variable defined in javascript in JSP

    how to get the value of a variable defined in javascript in/through JSP????

    In Javascript you can use the DOM to access the input element and set it's value before submitting the form. Then it's value will just be passed.

  • How to read the value of OLAPDataGrid cell/s from external object

    Hi,
    I have an OLAPDataGrid control in an Adobe flex application,
    and I am using the cutom renderer to render the cells of the
    OLAPDataGrid ,
    any Idea how I can read the value of each cell at the
    renderer , so I will be able to decide about the actions for each
    cell at the renderer?

    "j_shawqi" <[email protected]> wrote in
    message
    news:gkqgdl$539$[email protected]..
    > Hi,
    > I have an OLAPDataGrid control in an Adobe flex
    application,
    > and I am using the cutom renderer to render the cells of
    the OLAPDataGrid
    > ,
    > any Idea how I can read the value of each cell at the
    renderer , so I will
    > be
    > able to decide about the actions for each cell at the
    renderer?
    I'm thinking that you'll need to look at the listData
    property. I'm not
    sure what you get in an OLAP Grid that orients you to your
    cell position,
    but I'd set a break point in the listData override of your
    renderer and see
    what you actually have, or look at the docs for the data type
    of the
    listData object that the default renderer expects to get.
    HTH;
    Amy

  • How to check the value entered in one co from anethor CO

    Dear All,
    I have a Debrief screen in which one main region is attached to CO1 and a tab region is attached to CO2, the tab region  is an independent region in the main rdebrief main RN,
    Here i have a requirement if one of the field of the tab region is entered , that has to be captured in the Debrief main Region CO.
    could you help in assisting this.
    Regards
    AK

    AK,
    You can get handle of any item in the page from the mainCO by getting handle of the bean. You will have to get the handle of the tabbed region and get the handle of the corresponding field.
    Alternatively, you can get the value from the VO Attribute, if the field is mapped to a VO attribute.
    Cheers
    AJ

  • How to fetch the value of tabular form item in javascript

    Hello all
    I want to do some calculations on the value entered by the user in the textfield of a tabular form, how can I fetch the value of tabular form item in the javascript?
    I am using normal tabular form, not using apex_item tabular form.
    I can pass the current textfield value to the function using "this" as a parameter, but how can I fetch the value of other rows of that same column?
    Thanks
    Tauceef

    Hi Alistair
    jQuery is still not working, but I got it done through some other means, this is the code:
    function total(pThis){
    var l_Row = html_CascadeUpTill(pThis,'TR');
    var l_Table = l_Row.parentNode;
    var l_Row_next = l_Row;
    var n_rows = l_Table.rows;
    var lInputs;
    var v1;
    var sum = 0.0;
    var temp;
    var i = 0;
    var j = 0;
    //alert(n_rows.length);
    while(j < (n_rows.length - 1))
    temp = 0;
    if(l_Row_next != null){
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    //alert(v1);
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    temp = 1;
    if(temp == 0){
    l_Row_next = l_Table.getElementsByTagName('TR')[1];
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    j= j+1;
    $x('P78_TOTAL').value= parseFloat(sum);
    I am calling this function onblur event of the textfield.
    Still I am having one problem, I want to perform this calculation on load of the page also, how can I do that? because while calling onblur of the textfield I can pass that textfield to this function but on onLoad how I will pass the textfield to call this function so that I will be able to get the textfield value in the function?
    there may be some rows already existing, so I want the total of the existing rows to be displayed in my P78_TOTAL textfield that is why I need to do this calculation on onLoad of the page.
    Thanks
    Tauceef
    Edited by: Tauceef on Jul 8, 2010 4:57 AM

  • DB: How to handle the value results.GetString("NAME")

    Hello.
    I'm trying to handle the value of a field from my DataBase:
    PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    String Name = results.GetString("NAME");
    out.println(myName);
    I'm able to display the value of 'myName' (Tom), but if try:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Does anybody have any experience?
    Thank you.

    hey,
    String myName = results.getString("NAME");
    then u can use
    if(myName.equals('Tom'){
    }else
    The above condition will be true if myName has Tom in it.. it has to be T o m . even if it is TOM or tOm or some other case it will never match.. if u are not bothered about the case then
    use
    if(myName.equalsIgnoreCase('Tom'){
    }else
    which will ignore case .
    hope this will help u ....
    Hello.
    I'm trying to handle the value of a field from my
    DataBase:
    PreparedStatement sql = Conn.prepareStatement("SELECT
    NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    String Name = results.GetString("NAME");
    out.println(myName);
    I'm able to display the value of 'myName' (Tom), but
    if try:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Does anybody have any experience?
    Thank you.

  • How to retrieve the values from a LinkedList

    Hello,
    I have just put this question in java programming forums by mistake...I think that it should be here ...
    I have created a LinkedList to store the results of a query to a database.
    These reasults are decimal numbers and then I want to sum all these numbers to be able to make the average.
    But when I try to retrieve the values of the Linked List I always receive an incopatible types error..
    Here is an extract of my code in a jsp page.
    LinkedList Average = new LinkedList();
    String Media = rst.getString(10);
    Average.add(Media);
    int Size = Average.size();
    double Sum = 0.0;
    for (int i=0; i<=Size; i++)
                    double Result = Average.get(i)     
                  Sum = Sum + Result;
    }If I try to retrieve the value of only one node from the list , I can just putting <%=Average.get(i)%>...but..how can I retrieve all the values (they are decimal numbers) to be able to add them?

    If you want to sum all the values, is there any reason you just don't retrieve the sum from the database rather than the list of values?
    anyway
    List average = new LinkedList();
    while (rst.next()){
      // retrieve the number:
      String mediaString = rst.getString(10);
      Double media = Double.valueOf(mediaString);
      // or maybe like this if it is a number in the database
      Double media = new Double(rst.getDouble(10));
      average.add(media);
    doubleSum = 0.0;
    for (Iterator it = average.iterator(); it.hasNext(); ){
      Double result= (Double) it.next();
      doubleSum += result.doubleValue();
    }

  • How to get the values of 2 dynamic comboboxes in one jsp to another jsp?

    I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
    Select.jsp:
    <%@ page language="java" import="java.sql.*" %>
    <%!
         Connection con = null;
         Statement  st  = null;
         ResultSet  rs  = null;
         String     sql = null;
         void addItems(javax.servlet.jsp.JspWriter out, String sql)
           try{     
              rs = st.executeQuery(sql);
              while( rs.next() )
                   out.println("<option>" + rs.getString(1) + "</option>");               
         }catch(Exception e)
                   System.out.println(e);
    %>
    <HTML>
    <HEAD>
    <TITLE>JSP WITH  MULTIPLE FORMS</TITLE>
    <script language="javascript">
              function checking()
                        form1.submit();
         </script>
    </HEAD>
         <body>
             <center>
             <b><font size="5" color="#333399">Staff ID:</font></b></center>
                     <FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
                         <p align=center>
                         Details of Staff :  
                       <SELECT 1 NAME="type" onchange="checking();">
                                    <option> Administrator </option>
                              <option> OfficeAssistent </option>
                              <option> Clerk </option>
                                  </SELECT 1>
                          </p>
    </FORM>
                      <FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
                      <center>
                          <TABLE><TR><TD>Staff ID:</TD>
                                 <TD><SELECT 2 NAME="staff_id">
                    <%    
            String type = request.getParameter("type");
            try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
            catch (ClassNotFoundException ex) {
                   System.out.println(ex);
            catch (SQLException ex)
                System.out.println(ex);
         st  = con.createStatement();
         sql = "select staff_id from "+type+"";
         addItems(out, sql);
    %>
              </SELECT 2>
           </TD>
         </TR>
    </table></center>
    <h2> Details of <%= type + "s" %> </h2>
                         <center><input type=submit value=ok onclick="submit();"></center>
                  </FORM>
         </BODY>
    </HTML>
    welcome1.jsp
    <center><h1>WEL COME</h1></center>
    <%    
            String type = request.getParameter("type");
            String sid = request.getParameter("staff_id");
    %>
    <h2> Details of <%= type + "s" %> </h2>
    <h2> Details of <%= sid %> </h2>

    <SELECT 1 NAME="type" onchange="checking();">
                                    <option value = "0"> Administrator </option>
                              <option value = "1"> OfficeAssistent </option>
                              <option value = "2"> Clerk </option>
                                  </SELECT 1>

  • How to get the form reference in .js page from .jsp page

    hi
    i have written one form in jsp page omething like:-
    <html:form action="/shopping" onsubmit="return false;">
    can anybody tell me,how to get the form reference in .js page from .jsp page ,
    i have tried:-
    var formRef = document.forms[0];
    butits not working.
    Thanks.

    Its very simple......y cant u prefer google...Bad
    c this example...
    function submit()
    alert("textbox"+ document.forms[0].name.value);//to get textbox value in js
    document.forms[0].submit();//to submit jsp page using js
    <html:html>
    <html:form action="/shopping" onsubmit="submit()">
    <html:text property=name>
    learn to search in google..
    </html:form>
    </html:html>

  • How to extract the date value of IBOR date="12/12/2009"

    I have the following query, but do not get the date value out:
    WITH ibors AS (
    SELECT xmltype('<?xml version="1.0" encoding="utf-8"?>
    <IBOR date="12/12/2009">
    <LIBOR currency="USD">
    <OneYear>1.38875</OneYear>
    </LIBOR>
    </IBOR>
    ') ibor_xml
    FROM dual
    SELECT i.ibor_date, i.ibor_oneyear
    FROM ibors,
    XMLTABLE(
    '//IBOR'
    PASSING ibors.ibor_xml
    COLUMNS ibor_date VARCHAR2(20) PATH '/IBOR/date',
    ibor_oneyear VARCHAR2(20) PATH '/IBOR/LIBOR/OneYear'
    ) i;
    How to extract the date value of <IBOR date="12/12/2009">?

    Hi,
    The date is an attribute of element IBOR. So you must use "@date" in the xpath expression :
    WITH ibors AS (
    SELECT xmltype('<?xml version="1.0" encoding="utf-8"?>
    <IBOR date="12/12/2009">
    <LIBOR currency="USD">
    <OneYear>1.38875</OneYear>
    </LIBOR>
    </IBOR>
    ') ibor_xml
    FROM dual
    SELECT i.ibor_date, i.ibor_oneyear
    FROM ibors,
    XMLTABLE(
    '//IBOR'
    PASSING ibors.ibor_xml
    COLUMNS
    ibor_date VARCHAR2(20) PATH '/IBOR/@date',
    ibor_oneyear VARCHAR2(20) PATH '/IBOR/LIBOR/OneYear'
    ) i;

  • How to pass the value from Sub report to main report

    I have un report(mainreport) within a subreport(subreport).
    With reporting services, how to pass the value from Sub report to main report?
    thanks

    Hi Alebet,
    With reporting services to pass values from sub report in to main report is not supported directly.
    But there are some workarounds through which you can get this .
    There are two ways to get this.
    1- Put your sub report query into some table. i mean to say through the subreport query get some temporary table.
    2- Using this temporary tables data write some Scala function in the data base.
    3- Now in your main report query return this scala function as a column.
    4- Extract the column value where ever you want in your main report which is getting calculated from the subreport query. so you will be getting the values returned from the subreport in the main report.
    This will definitely work fine as i have done some report in this way.
    Another way of doing is that
    1- prepare another data set with the same query as in sub report in the data tab.
    2- then refer this 2nd dataset in your main report .
    But better way will be the top one.
    Anyway please let me know if you get the solution.
    Thanks
    Mahasweta

  • How to Access the value(Ex: Delivery no) From Web to R/3 side.

    How to Access the value(Ex: Delivery no) From Web to R/3 side.
    Any sample code please suggest.
    sai

    Hi,
    Try RSA3.
    Extract Checker
    /people/sajeed.ms/blog/2006/02/12/extract-checker
    Thanks,
    JituK

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

Maybe you are looking for

  • How to use a driver for two installations

    Hi everyone I downloaded from ni.com a driver for my spectrum analyzer (agesa). I had this installed on a LV 8.0 installation, and it worked. I have now updated to 8.2. In this installation the driver doesn't show up. The problem: I need both install

  • How to connect my SoundBlaster Live! to my Dolby 5.1 receiv

    Hey all, I'd like to connect my SoundBlaster Li've! (http://www.soundblaster.com/products/li've24bit/) to my receiver (http://www.sherwoodusa.com/prod_rd605.html) to get surround sound. Is this possible, and if so, how? Thanks in advance! Martin

  • My computer isnt recognizing my iphone so i can hard reset it, what do i do?

    i cant turn my phone on, it is currently stuck at the apple logo

  • Using java.nio

    I have copied this, one program from a book that would have to read file of gives to me to you mixed but it does not work, you could me why? import java.io.FileInputStream; import java.io.IOException; import java.io.File; import java.io.FileNotFoundE

  • How to call  group of files  into it_upload.

    i have the requirement like this.... can i use 6 times to upload six files or at a time can i found all the file in internal table through function module.