JSP multiple form question

Hi
I have to create a multiple page user input form, i was wondering if there was a way to set the target to a div tag when submitting the form, so that it looks like the way an ajax application.
Cannot use ajax cause i am getting javascript unknown runtime errors if i have the form element inside the div tag.

i just read that too, and was about to edit my response :)
I dont want to rebuild the entire page, just the section that the form displays in, currently it is in a div tag.
if it was just static content, ajax would definitely be simple, but i cannot submit the form to set the new session bean values that the user has entered. because the ajax doesnt load if there is a form element in the div tag. if i place the form element outside the div tag which innerhtml changes, then the button doesnt recognise the form name.
so i am continuing my search for another way.

Similar Messages

  • JSP parameter form question...Please Urgent..

    Hi,
    Can I use JSP parameter form to the Paper report.
    Like calling the paper report URL in the action=<" "> by passing the values selected in the jsp param form to the parameters in the paper report URL ?
    Please give me the code.
    Please help me. Its very urgent.
    Thanks alot.
    Priya.

    you just have to define the report user parameters with the same name you use in the JSP parameter form and setting the action attribute of the Form tag like that(calling rwservlet) action="rwservlet" & method="get", then all form inputs will be concatenated to the rwservlet call and passed as parameters to the report.
    thx.

  • Acrobat Pro Multiple form question

    I am creating a form in Acrobat Pro to be distributed and tracked throught the response tracker. The form that I am doing would have 6 sets of the same form fields for different entries into the tracker. Does anyone know how I can do this so each entry is recorded separately in the tracking fields?

    One distributed PDF will have only one entry in Tracker. If you want to manage data from Subforms in a PDF form you need to use LiveCycle designer and bind xml or any other database to your form and then you can easily manage the data you want.
    ~SaVe

  • Loading multiple forms in single jsp

    Hi,
    My jsp page has multiple forms (one form for each table which has specific info). So assume it has 3 tables, so 3 forms.
    I need to load all the form when the page is loaded.
    code:
    <FORM name=form1 action="/action1" method=post></FORM>
    <FORM name=form2 action="/action2" method=post></FORM>
    <FORM name=form3 action="/action3" method=post></FORM>
    So if I need to load all the forms, how should I proceed. Also please note each form has its own form class and action class.
    For e.g. Assume Page A (From Page A I am coming to this form page via a hyperlink and there is no action class in between) calls the page with 3 forms and I need to display all the values in the 3 forms. So how can I call the action classes for each of the 3 forms.
    So when and how will the action1, action2, action3 called?
    Any help would be greatly appreciated.
    Thanks.

    Thanks for your reply. I understand only one form would be submitted. Its ok.
    But the thing I am looking at is loading the multiple form values at a time.
    I have page A, Page B (where I need to display multiple form values. Actually this page has 3 tables, and each table is one form e.g. one table has all the name values, one table has all address values. So each has different actions).
    I am calling Page B via a hyperlink from Page A. Since I need to use hyperlink, there is no way (atleast I dont know) of using action class or anything.
    Now, my question is how do I populate the values for all these 3 forms.
    Any help would be great.
    Thanks.

  • Multiple form inside one jsp file

    I have to use nested jsp forms in my latest project
    ex:-
    <html>
    <head>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="ex.htm">
    <form id="form2" name="form2" method="post" action="ex2.htm">
    </form>
    <form id="form3" name="form3" method="post" action="ex3.htm">
    </form>
    </form>
    </body>
    </html>
    Can some one tell me, is there a way to submit the each forms seperatly?
    -----------------------------------------------------------------More on problem-----------------------------------------------------------------
    I am developing e-savings application.
    When the customer enter the accountno i need to display details - for this i use "form1"
    When the customer enter the withdrawal amount i need to display the balance - for this i use "form2"
    Finally i use "form3" to submit the data.
    I have done all the things inside one jsp page.
    I think you are now clear in my problem and hope best solution....
    Thank you........

    According to the HTML specification, you may not nest forms.
    You can use multiple forms as long as you don´t nest them.

  • Beginner JSP / Forms question

    Hello,
    I'm just starting with jsps and I've got a pretty simple question. In my jsp I generate a form with two fields: age and weight. I'm wondering what the best method is for handling the users response. Two specific questions: (1) I'm currently handling the response in the same jsp which generates the form. Is this bad, uh, form? (2) To differentiate between the 'initial' request and the request resulting from the users form submission I'm arbitrarily checking whether the value of the 'age' parameter is null. Is there a better way to do that? Thanks in advance for any thoughts on these issues.
    -exits

    Yeah, that is fine for early JSPs (on both questions).
    A couple of thoughts:
    1) What if the user submits a weight but not an age? You should probably check if either of the two inputs are null.
    2) This design is fine for smaller applications (it is called the Model 1 application design). For more complex applications, using Model 2 (Model - View - Controller or MVC) pattern is much better.
    Basically you use a combination of Servlets and JSPs. One servlet is the target of all your links and forms - this is the Controller. Based on parameters and other conditions, the controller determines where the page should go next, and accesses the business logic (other classes that get/store data or calculates results. These other classes are the Model) , and passes this information to the the JSP needed to display that information (the View).
    This helps JSPs stay small and manageable, since adding to much logic in a JSP means writing scriptlets, which become tough to maintain later on. It takes more work up front, but for larger apps and over longer periods of time (when it becomes time to update the look, or fix bugs) it makes a lot of sense.

  • Generate and Print Preview Multiple Forms in a Single PDF

    There have been other questions similar to this but none directly address my problem.  We have the need to generate multple forms in a .pdf using Adobe interactive forms.  We can generate the multiple forms, but the user has to click on each form to view.  They want to have the forms in a single document that they can scroll through before printing.  We can do this in SmartForms but need to do it in Adobe.  Does anyone know how to generate multiple forms, either multiple copies of the same form or various forms, from an ABAP program into a single pdf that can be print previewed, in scrollable form, by the user?

    I can describe it one more time, I think:))
    You have multiple options, but only one "reasonable" within SAP.
    You can call an external application (through command line etc.) to concatenate forms for you.
    You can use iText as mentioned in the thread, and write yourself a "tool" which will concatenate the forms for you.
    Both these "options" would not be acceptable for my clients, I name them to help you get the whole picture.
    Then there is the third option: use a form for a single instance (template/ form A) and create a new form (form B), where you will use the A template:
    - you need to: create a new interface where everything from the old interface is a row of the table (example: you have a form to print out the personal card of the employee, so in a new form you will need to use a table, where a row is an employee)
    - you need to create a new form layout based on the new interface:
    in this new layout you will paste the whole layout of the old form (A/ single instance) and wrap it into a subform. The added subform will work as a table (you will bind that to the table from interface) and everything from the old template within this new subform will work as a "row" (something what you can repeat for each data item).
    Does that sound reasonable?
    Cheers Otto

  • Print multiple forms between FP_JOB_OPEN and FP_JOB_CLOSE

    I am aware, that there are questions regarding "Printing Multiple forms", but I didn't find answers there.
    Still my system is not working as expected:
    1.  FP_JOB_OPEN is called
    2. the generated Adobe Forms function is called multiple times
    3.  FP_JOB_CLOSE is called
    This program doesn't deliver all the pages, but just the first call. How shall I solve this problem?
    (Coding should work anywhere with copy-pase.)
    data: fm_name           type rs38l_fnam,
          fp_docparams      type sfpdocparams,
          fp_outputparams   type sfpoutputparams.
    parameters: p_fpname type fpname default 'FP_TEST_02'.
    * Get the name of the generated function module
    call function 'FP_FUNCTION_MODULE_NAME'
      exporting
        i_name     = p_fpname
      importing
        e_funcname = fm_name.
    * Sets the output parameters and opens the spool job
    call function 'FP_JOB_OPEN'
      changing
        ie_outputparams = fp_outputparams
      exceptions
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 4
        others          = 5.
    * Call the generated function module
    call function fm_name.
    * SECOND CALL ****************************
    call function fm_name.
    * Close the spool job
    call function 'FP_JOB_CLOSE'
    *    IMPORTING
    *     E_RESULT             =
      exceptions
        usage_error           = 1
        system_error          = 2
        internal_error        = 3
        others               = 4.

    Hi ZSOLT,
    In order to call the form multiple times please do the following,
    1) Just before your FP_JOB_OPEN you need to pass the output parameters (good practice). You can also set other parameters as well (for example nodialog, preview, copies., etc)
      CLEAR  fp_outputparams.
      fp_outputparams-dest = 'PDF1'.      "Default pdf printer
      fp_outputparams-reqnew = 'X'.       "New spool request
    Now call your FM FP_JOB_OPEN with the above output parameters.
    2) Usually this step is processed in a loop. (getting your interface data into a internal table and then looping at it)
    But here I am enhancing your example code.
    In order to trigger the form multiple times you need to change some input data to the form (for example I have changed date and time below in the prepare test data sections) so that the call function fm_name gets regenerated every time there is new data
    data  l_datatypes       type sfpdatatypes.
    prepare test data
      l_datatypes-char = '#'.
      l_datatypes-string = 'Auf geht''s! '.    "#EC NOTEXT
      l_datatypes-numc = '42'.
      l_datatypes-dec = 0 - ( 12345 / 7 ).
      l_datatypes-fltp = 0 - ( 12345 / 7 ).
      l_datatypes-int = 4711.
      l_datatypes-curr = 0 - ( 12345 / 7 ).
      l_datatypes-cuky = 'JPY'.       " no decimals
      l_datatypes-quan = 12345 / 7.
      l_datatypes-unit = 'DEG'.       " 1 decimal
      l_datatypes-date = '20040613'.      
      l_datatypes-time = '100600'.         
      l_datatypes-lang = sy-langu.
    FIRST CALL ****************************
    Call the generated function module
      CLEAR fp_docparams.
      fp_docparams-langu = 'EN'.       
      fp_docparams-country = 'US'.  
      call function fm_name
        exporting
          /1bcdwb/docparams        = fp_docparams
          datatypes                = l_datatypes
          mychar                   = l_datatypes-char
         mybyte                   =
          mystring                 = l_datatypes-string
         myxstring                =
          mydate                   = l_datatypes-date
          mytime                   = l_datatypes-time
          mynum                    = l_datatypes-numc
          myint                    = l_datatypes-int
          myfloat                  = l_datatypes-fltp
          mypacked                 = l_datatypes-dec
      IMPORTING
        /1BCDWB/FORMOUTPUT       =
    prepare test data
      l_datatypes-char = '#'.
      l_datatypes-string = 'Auf geht''s! '.    "#EC NOTEXT
      l_datatypes-numc = '42'.
      l_datatypes-dec = 0 - ( 12345 / 7 ).
      l_datatypes-fltp = 0 - ( 12345 / 7 ).
      l_datatypes-int = 4711.
      l_datatypes-curr = 0 - ( 12345 / 7 ).
      l_datatypes-cuky = 'JPY'.       " no decimals
      l_datatypes-quan = 12345 / 7.
      l_datatypes-unit = 'DEG'.       " 1 decimal
      l_datatypes-date = '20100913'.                 "You need to change your data in order it to trigger a new form with the new data.
      l_datatypes-time = '10700'.                        "You need to change your data in order it to trigger a new form with the new data.       
      l_datatypes-lang = sy-langu.
    SECOND CALL ****************************
    Call the generated function module
      CLEAR fp_docparams.
      fp_docparams-langu = 'EN'.
      fp_docparams-country = 'US'.
      call function fm_name
        exporting
          /1bcdwb/docparams        = fp_docparams
          datatypes                = l_datatypes
          mychar                   = l_datatypes-char
         mybyte                   =
          mystring                 = l_datatypes-string
         myxstring                =
          mydate                   = l_datatypes-date
          mytime                   = l_datatypes-time
          mynum                    = l_datatypes-numc
          myint                    = l_datatypes-int
          myfloat                  = l_datatypes-fltp
          mypacked                 = l_datatypes-dec
      IMPORTING
        /1BCDWB/FORMOUTPUT       =
    Close the spool job
    call function 'FP_JOB_CLOSE'
       IMPORTING
        E_RESULT             =
      exceptions
        usage_error           = 1
        system_error          = 2
        internal_error        = 3
        others               = 4.
    I have tested the above code and I am getting multiple forms.
    Please try on your end and let me know if it works.
    Thanks
    Raj

  • ORACLE EXPRESS: build a page with multiple forms linked to one table

    hi,
    im using oravle application express. APEX
    i would like to build a page with multiple forms linked to one table (orders) , the page has 4 from  each one with different order_id number (depending on filtering),  and if the order is prepared click yes for each order and this 'YES' should be UPDATED AND SAVED to each order number in the same table with the press of one button.
    i created all the form as (sql query)
    and create one update process
    (UPDATE ORDERS
    SET TRAY_PREPARED =:P10_TRAY_PREPARED_1
    WHERE ORDER_ID =:P10_ORDER_ID_1;
    UPDATE ORDERS
    SET TRAY_PREPARED =:P10_TRAY_PREPARED_2
    WHERE ORDER_ID =:P10_ORDER_ID_2;
    UPDATE ORDERS
    SET TRAY_PREPARED =:P10_TRAY_PREPARED_3
    WHERE ORDER_ID =:P10_ORDER_ID_3;
    UPDATE ORDERS
    SET TRAY_PREPARED =:P10_TRAY_PREPARED_4
    WHERE ORDER_ID =:P10_ORDER_ID_4;
    i dont know really if i can do that, but it appear hat it actually saving according to order_id number , but not all the time some time it saved the value as "null".
    please guide me what is the correct way to do this.
    I READ THIS ONE
    http://stackoverflow.com/questions/7877396/apex-creating-a-page-with-multiple-forms-linked-to-multiple-related-tables
    BUT IT WAS FOR MULTIPLE INSERT
    thanks.

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • Merging multiple forms and having shared fields

    I am designing multiple forms for a client for application purposes.  There are about 40 forms in all. Client is designing a online helper that will help users download only the forms they need for their application.  So once that is decided, then we are giving them a download link for required forms only. In the end client will print the forms and submit them manually. (I know it could be done better, but not yet) There will be about 16-17 different combinations of forms.
    Thing is, many of these forms have repetitive fields (name, address, phone, email, etc), so we would REALLY like to have it so that once filled out, those fields could quickly populate all the rest of the remaining forms. (does that make sense?)
    I have had a couple ideas on how to accomplish this
    1) Magic
    2) Combined all required forms into one large PDF.  Make the 16-17 possible combinations and then just set them all up manually.
         Problem is that if Form 6 changes, it may change in 10 different packages.  I don't want to do that manually every time there is a change
    3) Somehow use Adobe Livecycle to piar the fields up in the different docs, and have them all linked. (think that is impossible, hense #1)
    4) Your suggestion?
    Thanks in advanced.
    Ask any questions you may need.

    The templates/PDFs designed in LC are primarily can not talk to each other. But we can make them pull and save the information stored in Database through LC workflow. Which will give them ability to transfer data between using SOAP (we can activate these SOAP transfers on certain events or on user actions). But that involves User acknowledging each time the data transfer activated (of-course there is an option to remember the user action and never ask the user but it is controlled by user). Things get complicated once you start in this direction. However we use this technique in our internal environment.

  • Select more than one answer on a multiple choice question

    How do you select more than one answer on a multiple choice question on an employment application on the internet?

    marmaldonado,
    Is this a PDF form? Or a web form?
    Clinton

  • Submit multiple forms with java

    Hello,
    I have a problem when I am submitting multiple forms with the javascript document.form1.submit();.
    I shall explain what my problem is. I have made a JSP that contains some forms. In the forms I post values to external sites. so the action from the forms are http://www.example.com/employee/login. I post my username and password to this external link so I have logged in. So I do this for 20 different sites. so 20 different actions in 20 different forms on one JSP.
    Now I have made one button that submit all of this forms. I do this with the javascript document.form1.submit();
    document.form2.submit();
    etc.
    But this is not consistent and I wan't a sollutions in Java so I am sure that all the forms wil execute. Because now he post only some forms and some not. So i want a solid sollution. Can anyone help me.
    Thanks in advance,
    Henk

    I had a similar situation a few years ago, where I needed to close sessions that my application had opened with different servers.
    The way I did it was with a secondary browser window, which my "primary" window would control. I had a JavaScript routine that would set the URL of the secondary window, loop with a timer and check the state of that window until the request had completed, then send the next URL, until I had "fired off" URLs to close all of my sessions.
    If this sounds like something you'd be interested in doing, let me know and I can post the code here.
    James W. Anderson
    The Coca-Cola Company

  • Help with multiple forms

    I'm new to the forums (and Java!) so please forgive me if this has already been asked or is a stupid question.
    I'm using the Netbeans IDE to create a series of forms that collect user input. The project is a similar to a "wizard" that asks a series of questions, collects the user input, then performs a query on a database based on the user provided answers to the questions.
    I assume that each question should be displayed on a new form, and when the user clicks "next", the data is added to an ArrayList until the wizard is complete. There are around 10-15 steps in this wizard (I know, it seems long but that's what my boss wants!), and I've drawn all the forms as separate .java files with JFrames in Netbeans.
    I also have one wizard.java file that has a main() method and creates a wizard object that has an ArrayList used to store the data, and a get() and set() method to access the ArrayList.
    The problem is when an action is performed on each of the steps' "next" button, I am trying to add to the ArrayList belonging to the wizard object. The compiler is complaining about it though. I think there's a problem with scope, but I really don't know for sure. I've butchered my code trying to figure out a way to do this. I come from a procedural programming background, and objects and interaction between classes just isn't making much sense to me.
    Any ideas and help are greatly appreciated!!

    I have have made a few wizards in my time as a freelancer and had it up to here with coding around JSP forms that I settled for a forms generation framework. There are a few out there that you might want to look at the next time you have to build web forms for your JSP application.
    Creating multipage forms, and generating form elements should no longer be a heavy duty task. All forms do only 1 thing, and that's to collect user input.
    A library like Formular (http://formular.redeye.no) or Devsphere Mapping Framework (http://www.devsphere.com/mapping/) should do the trick.
    I personally like the way Formular handles wizards and takes care of all the navigation between screens. The other advantage of Formular is of course that you do not bloat your JSP with form handling code that would handle preselection of checkboxes and radio buttons, looping through arrays to generate option tags, displaying exceptions and form messages, etc.

  • Multiple forms on a JSF view

    Hi!
    Does somebody knows what I'm doing wrong here?
    Look at this very basic example:
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Test multiple forms</title>
    </head>
    <body>
    <f:view>
      <h:form>
        <h:outputText value="Field 1: " />
        <h:inputText value="#{testMultiform.field1}" /><br>
        <h:outputText value="Field 2: " />
        <h:inputText value="#{testMultiform.field2}" />
        <br>
        <h:commandLink value="Test form 1"
           action="#{testMultiform.executeForm1}">
        </h:commandLink>
      </h:form>
      <c:import url="footer.jsp"/>
    </f:view>
    </body>
    </html>and the imported file (footer.jsp) looks like this:
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:subview id="footer">
      <h:form>
        <h:commandLink value="Test form 2" action="exe2">
        </h:commandLink>
      </h:form>
    </f:subview>The example uses two forms components (one included with the c:import JSTL command), each with a commandLink component. I know that JSF permits two forms in a view. However the second commandLink, inside the second form component, is ignored. Could somebody say me the reason?
    Thanks!
    Christian

    The problem, seems to be a bug in the reference implementation from Sun (verision 1.1). Try with next version (1.1.01). Follow this link for a more extended explanation: http://www.manning-sandbox.com/thread.jspa?forumID=95&threadID=10732&messageID=33625#33625
    (if the link is broken visit the site in http://www.manning-sandbox.com/ , where th bug is explained.
    I hope this helps. Bye!
    (another) Christian

  • Create Form Beans from JSP/HTML forms

    In the Builder certification objectives, there is one called "Create Form Beans from JSP/HTML forms". How can I do that? How can I create a form beam starting from the JSP form or HTML form?

    Guys, no one from forum can answer this question?

Maybe you are looking for

  • Problems with sub menus in Internet Explorer

    My menu bars work great in Chrome and Firefox however my submenus are jacked up in Internet Explorer. Can someone please give me some direction? Thanks. The website is www.aptyssolutions.com

  • Normal is takes long time

    Dear Experts, i tried to enable audit option in oracle 10.2 .0 database which is running on windows box, after set this command , i tried to restart the DB with shutdown (only) option. ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE; but its takes long

  • Can't find 9i report builder

    after i download "Oracle9iAS Enterprise Edition" on http://otn.oracle.com/software/products/ias/devuse.html , then extract and install this product, but i can't find the 9i report builder ? what wrong about me ?

  • Illustrator cs2 activation

    I have a legit Illustrator CS2 license and have installed it onto my new Windows 8.1 PC.  Is there a way to stop the activation prompt or correct it?

  • New MBP owner with a question about OS disks.

    Just got a new mac book pro, I didn't get the OS disks in the box with the computer. Did I get short changed? A lot of the what I've read, there seems to be a need to use the OS disks, specially when partitioning the drive. Is it normal for the Macs