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>

Similar Messages

  • How to get the URL parameter value when navigating from JSP Page to portal

    Hi All,
    I have web Dynpro application with one button, while clicking that button It will navigate to JSP page as external window. In the JSP page I have a input field and Button.
    In the JSP page input field I will enter some values and press submit button, it will navigate to Portal page by passing some URL parameter with values.
    Once user entering to portal by default WD page displayed, the same WD page I try to get the URL Parameter which I have passed from JSP page, but I am not able to get the URL parameter value.
    If same application running in without portal, I can able to get the URL parameter values. I am getting the URL parameter by interface view default inbound plug parameter.
    How do we resolve this problem?
    Regards,
    Boopathi M

    Hi
    Please try  these link might helpful for you
    1.[How to call WebDynPro application from JSP |/thread/452762 [original link is broken];
    2.[How to get the previous page url from abstract portal component? |/thread/1289256 [original link is broken];
    3.[how to launch and pass a parameter |/thread/5537 [original link is broken];
    Best Regards
    Satish Kumar

  • How to get the form name which is used in standard tcode like me23n in sap

    how to get the form name which is used in standard tcode like me23n in sap
    Moderator message: four out of four threads locked, please read and understand the following before posting further:
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
    Edited by: Thomas Zloch on Nov 18, 2011 1:32 PM

    how to get the form name which is used in standard tcode like me23n in sap
    Moderator message: four out of four threads locked, please read and understand the following before posting further:
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
    Edited by: Thomas Zloch on Nov 18, 2011 1:32 PM

  • How to get the form printed through the transaction ME42

    hi,
    How to get the form printed through the transaction ME42.
    For example :
    In t.code vf03 . In the main menu there is an option billing document , when we click on that we get a drop down menu which shows issue output to. If a print program call has the code to get the value from the t.code , immdiately when we click issue output to it call the form.

    Here go to ME42 put in your RFC no, in the menu Header -- Messages, go there and see if a message has been inserted, else you can insert one.
    when you save this, it will call the form.
    Regards,
    Ravi

  • How to get the absolute path of a file from the local disk given the file n

    how to get the absolute path of a file from the local disk given the file name

    // will look for the file at the current working directory
    // this is wherever you start the Java application (cound be C: and your
    // application is located in C:/myapp, but the working dir is C:/
    File file = new File("README.txt"); 
    if (file != null && file.exists())
        String absolutePath = file.getAbsolutePath();

  • How to get the field row name of database from a form?

    Hello experts,
    I am newer in OIM and developments with the API's.
    I have this environment,
    one resource that have the attribute department
    relationship with the database row
    UD_RESOURCE1_DEPARTMENT and other resource with the same attribute in, UD_RESOURCE2_DEPARTMENT
    I am programing one java class that put values in the
    form field through the table name, sample,
    UD_RESOURCE_DEPARTMENT.
    I let some code:
    # Hash table with the value of Department
    myMap.put("UD_RESOURCE_DEPARTMENT", value);
    # and save in the resource form
    tcFormInstanceOperationsIntf tcform = (tcFormInstanceOperationsIntf)tcUtilityFactory.getUtility(dataProvider,"Thor.API.Operations.tcFormInstanceOperationsIntf");
    tcform.setProcessFormData(Long.parseLong(formKey), myMap);
    But this solution implies know the name of the field in the database and not is a global solution.
    I am interesting in know how I can obtain the name of the
    row field of the database for the atribute. Does anybody know how to obtain the row field name of database from an IT Resource or through the field name of the form?
    Is this the correct way to store data in a form?
    Thanks in advanced.

    Hi,
    Thank you.
    I have seen this function in the OTN help, but how can i get the index number. My requirment is when saving the data, I need to save both the value and the element name into the database,
    Also it is tabular block, more than one rows
    Thanks again

  • How to get the row reference of inner table of an advance table

    Hi Gurus,
    Using R12.1.3, How to get the handle of inner table row reference of an advance table in controller.
    Regards,
    Zakir

    The javadoc for oracle.jbo.Key is really helpful.
    getAttributeNames()
    getAttributeValues()
    etc

  • How to get the menu reference of a control while runtime

    Hello...
    i want to disable the control's short-cut menu programmatically. i could do it by using the event structure and 'shortcut menu activation' event.
    this is why i am asking about getting the menu reference if individual control.
    is there any other way out without using event structure?

    "Share_Good" <[email protected]> wrote in message
    news:[email protected]..
    > Hello...&nbsp;i want to disable the control's short-cut menu
    programmatically. i could do it by using the event structure and 'shortcut
    menu activation' event.&nbsp;this is why i am asking about getting the menu
    reference if individual control. &nbsp;is there any other way out without
    using event structure?&nbsp;&nbsp;
    No. You have to use the event. But if you simply disgard the activation, you
    don't need to change it's run time menu. You'll need the event structure
    anyway to catch the selected menu item.
    Regards,
    Wiebe.

  • How to get the bind value of a portlet in a page.

    I want to get the bind value of a portlet on a page. Can you tell me how can I get that.
    I used :
    portal30.wwv_name_value.get_string( l_arg_names, l_arg_values, '');
    It works ok when we run the report alone .But when we add the report as a portlet in page , it does not return any value. Can you tell me which Api does it.
    null

    Here is an example...
    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
    out = out.concat(zeroPad(d2h(reqHex[No]),2));
    return out;
    function eyeDropperRGB(x,y) {
    var x2 = x + 1;
    var y2 = y + 1;
    var out = new Array(3);
    activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
    for(ch in list = ["Red", "Green", "Blue"]) {
    histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
      return out; 
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;

  • HOW TO GET THE SELECTED VALUE IN A ROW FROM ONE VIEW TO ANOTHER VIEW?

    hi all,
    I  have a small issue.
    i have created two views.In the table of the first view i'm selecting a row and pressing the button it will move to next view.
    i am adding some fields manually in the table of the second view and pressing the save button.Here all the values should get updated corresponding to the field which i have selected in the first view.
    I want to know how to get the particular field in the selected row from one view to another view.
    Kindly help me.

    Hi,
            Any data sharing accross views can be achiveved by defining CONTEXT data in COMPONENT CONTROLLER and mapping it to the CONTEXT of all the views. Follow the below steps.
    1. Define a CONTEXT NODE in component controller
    2. Define same CONTEXT NODE in all the views where this has to be accessed & changed.
    3. Go to CONTEXT NODE of each view, right click on the node and choose DEFINE MAPPING.
    This is how you map CONTEXT NODE and same can be accessed/changed from any VIEW or even from COMPONENT CONTROLLER. Any change happens at one VIEW will be automatically available in others.
    Check the below link for more info regarding same.
    [http://help.sap.com/saphelp_nw04s/helpdata/EN/48/444941db42f423e10000000a155106/content.htm]
    Regards,
    Manne.

  • How to get the value of sessionbean's properties in JSP?

    Hi,All
    I want to invoke setInterval() in JSP,and invoke clearInterval() when sessionbean's property is not null.But I don't know how to get the sessionbean's property.
    Thanks
    Smile.

    I'm not sure you can directly access a session bean from JSP.
    Although I haven't tried this with sessionBean1, you might try using JSP's useBean tag.
        <jsp:useBean id=<localName> type=<classPath> scope=<scope> />localName is the name you want to use to refer to the bean. classPath is the fully qualified class path. scope is either page, request, session, or application.
    I use this approach for accessing Java Beans. But before you can use the bean you have to add it as a session attribute. This makes it accessible to the page.
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ExternalContext externalContext = facesContext.getExternalContext();
        HttpSession session = (HttpSession)externalContext.getSession(false);
        session.setAttribute(<attributeName>, <attributeValue>);You can then access the bean. I use scriptlets although you could also use JSP expressions or EL. I use scriptlets because I'm more comfortable with it.
    <jsp:scriptlet>
        Address address = (Address)session.getAttribute("Address");
        if(address != null) {
            value = address.getAddress1();
            if(value != null) {
                out.println(value);
            value = address.getAddress2();
            if(value != null) {
                out.println(" " + value);
    </jsp:scriptlet>I use this approach for accessing Java Beans. But before you can use it you have to add it as a session attribute.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    HttpSession session = (HttpSession)externalContext.getSession(false);
    session.setAttribute(<attributeName>, <attributeValue>);

  • How to get the planned quantity of past month from md61

    Hi all,
           I couldnt get the planned quantity of past month from the tcode md61.It shows only the current and future month's demand.I want to know the planned quantity of past month's.
    I have checked PBIM,PBED,PBHI tables,here also I am facing the same problem.
        Is it possible to get past month quantity from md61? If No how to know the quantity planned for past month?...Please tel your ideas..
    Thanks in Advance!!!
    Edited by: Ranganayahi Chandirasekaran on Jul 30, 2008 8:17 AM

    Hi,
    You can check History of PIR through MD62 itself.
    Select particular row, Goto Menu, Select Item History(Shift +F6).
    Or
    You may pls execute transaction MD73.
    Plz select option "3 :History Planned ind reqmnts " in the display options and execute the report.
    Regards,
    R.Brahmankar

  • How to get the response of a vbscript ran from extended js?

    Hi All,
    I  want to get the result from a vbscript, how to get that in my jsx? This is what I'm doing-
    vbscript (this will return me something, i've added just a sample string)
    Wscript.Echo "Like this?"
    jsx
    var a = File("C:\\Users\\Sahil\\AppData\\Roaming\\CreativeWorx\\1.vbs");
    var b=a.execute();
    Now, variable b returns me true/false; and the output i.e. "Like this?"  is alerted! So my question is-
    1. How to get the output in a variable?
    2. How to avoid the alert
    So, I simply wish to get the output from my vbscript and then perform certain functions accordingly, alos, I dont want  this to be alerted!
    Any help will be highly appreciated!

    The capitalization is app.doScript and not app.doscript that is if you are trying to get a jsx script to run and access a string from from a vbs script.
    When defining the VBscript for multiline scripts the easiest method is to use triple quotes
    VBscript = """dim WMI:  set WMI = GetObject("winmgmts:\\.\root\cimv2")
    dim Nads: set Nads = WMI.ExecQuery("Select * from Win32_NetworkAdapter where physicaladapter=true")
    dim nad
    for each Nad in Nads
        if not isnull(Nad.MACAddress) then Wscript.Echo Nad.description, Nad.MACAddress  
    next"""
    when using the scriptArgs you can either make a loop of them and send the string value of each one something like this
    For (n = 0 .........
    myArg = "myArg" & n
    myStringToPassOver = "Shaddow Fax " & n
    app.scriptArgs.SetValue myArg, myStringToPassOver
    Next
    or probably better to make a long comma or something else separated string and pass it over after the loop
    var VBScript = """myArg = ""
    For n = 0 To 15
    myArg = myArg & "Shaddow Fax " & n & ","
    Next
    app.scriptArgs.SetValue "myResult", myArg
    app.doScript(VBScript, ScriptLanguage.visualBasic);
    var myResult = app.scriptArgs.getValue("myResult").replace(/\,$/,"").split(",");
    // if neaded use "replace" to remove final "," and "split" to convert into an array
    alert(myResult.join("\r")); // alert the array
    The above script is a jsx script that runs a vbs
    If you want a vbs script to run and access a string from from a jsx script then you would use xxx.DoScript see the sample from the manual below.
    Set myInDesign = CreateObject("InDesign.Application")
    myJavaScript = "alert(""First argument: "" + arguments[0] + ""\rSecond argument: "" +
    arguments[1]);"
    myInDesign.DoScript myJavaScript, idScriptLanguage.idJavascript, Array("Hello from
    DoScript", "Your message here.")
    myVBScript = "msgbox arguments(1), vbOKOnly, ""First argument: "" & arguments(0)"
    myInDesign.DoScript myVBScript, idScriptLanguage.idVisualBasic, Array("Hello from
    DoScript", "Your message here.")
    P.s.Please mark the question as answered, thanks

  • How to get the member of cost element group from Profit center group

    Hi Guys,
                  I need to get the member of cost element group from Profit center group like in Tcode KCH3 and the same from Account Group like in Tcode KDH3.
    Any Function Module available to get this data.
    Thank U for Ur time.
    Cheers
    Senthil

    I am closing this thread.

  • How to read all rows stored in pojo bean from jsp page

    Hi sir
    After storing all rows into ArrayList object in pojo class, how to retrieve those rows from jsp page and display them together one by one.
    Regards

    Well, you wouldn't do it in Java. You would do it in JSTL, preferably.
    So if your POJO had a getRows method which returned your List of row objects, you would get the list like this (after putting the POJO into request scope under the name of "pojo"):
    ${pojo.rows}
    And if you wanted to go through that list and process each of the rows, then c:forEach would be the way:
    <c:forEach value="row" items="${pojo.rows} />
    (check the documentation, I'm posting this from memory)

Maybe you are looking for

  • How to get the colums from a project view

    Greetings, I have a PjView-object from type Microsoft.Office.Interop.MSProject.View and I can output the name of the view (MsgBox(PjView.Name.ToString) So far so good. But now I have two questions: 1. How do I access the columns that are included in

  • Magic Mouse under XP

    I bet youve heard this problem before... My Magic mouse doesent work under winxp. I have no usb mouse, I have no Vista or 7... I tried putting the 0000 for the pass, changing the name on OSX but nothing, at most what I guet is to get the pass enabele

  • ROLLBACK SEGMENTS OPERATION

    Hello Everyone This is the first time I am a forum member and I'm figuring out how it works because I have a very big problem Look, I'm a support engineer and, as you know, the code of the application is not own by me. Three weeks ago I received a re

  • How to copy video event to thumbdrive

    How can I copy a video event to a thumbdrive or burn to a CD?

  • VSOM 7 - Motion detection save button greyed out

    Hi. Would like to enable motion detection on my cameras (all are capable, a.e. CIVS-3520). But after defining the motion areas (and exclude), the button below "save motion config" is greyed out. I have enabled them in the camera settings screen (and