Multiple HTML Form Selections

Hi there:
In my JSP page:
<form action="MyServlet" name="myForm" method=POST>
<select multiple name="selectMe" size=30>
<%=aBunchOfOptions%>
</select>
<input type="submit">
</form>
This form makes a big list of parts. The user needs to be able to select more than one part at a time. How do I access the list of selected options in the servlet?
Thanks,
Shawn

Use the javax.servlet.ServletRequest.getParameterValues - it'll return an array of values for the options.
JSTL will help keep things managable in this case. Much better choice than scriptlets.

Similar Messages

  • How can i select multiple values form select list

    Hi ,
    I have created few items in a page and all items are Lov items and based on these items stacked charts will display. My requirement is I need to select multiple values form LOV's
    Eg: In Interactive report goto filter and select an item and expression as IN and select multiple items and i need to select multiple values like this.
    Please anybody help me how to get multiple values.
    I have one more doubt Can we have a Print preview option in APEX.
    I have to see print preview for stacked charts. is it possible?
    Regards
    Narender B

    HI ,
    Thank you for valuable information and looks good.but Here our client need to select multiple values.... for eg: Open IR report and click on Actions button --->select filter
    select any column , operator as IN and from expression select multiple items.
    I need to select multiple values in that way so, could you please guide me how can i achieve this.
    Regards
    Narender B

  • Multiple selections in an HTML form

    The option selector (<select>...</select>) in an HTML form allows the
    user to make multiple selections. However, when the form parameters
    are posted to an XSQL page, only the first value selected will be
    assigned to the corresponding XSQL parameter.
    This is very unfortunate, because I would like the selected values to
    be used in a query like this:
    <xsql:query>
    select ...
    from ...
    where ...
    and elem in ({@list})
    and ...
    </xsql:query>
    where 'list' is the name of the option selector. However, since only
    the first value selected is substituted, the query does not work.
    The <xsql:include-request-params/> will "rowify" the values selected,
    but this can only be utilized by a style sheet associated with the
    XSQL page.
    Does anyone know how to get access to all the selected values in the
    XSQL page?
    HELP!

    Hi,
    Here is an approach that may work for you.
    In the registration process, assign each individual a userid...  e.g. bob123.
    When they log into your site, create a SESSION variable, SESSION.userid = bob123.
    In your db, for every player have two fields, one is the userid of the person that is attached to that player, and another field for the jersey number.  You could also have a field for assigned/unassigned.
    Populate the grid with the unassigned players.  Have the empty jersey number field on the grid and make it editable.  When an individual assigns a jersey number to the person, (you can have them update after each person selected or at the end), you can let a cfc update the db and using their SESSION.userid, they become the "owner" of that player.  The update also will update the db with their jersey number.  The update can also turn them from unassigned to assigned so noone else can "claim" them.
    Now anytime the user logs in, they'll have their players, easy to get to using a WHERE sql statement = WHERE SESSION.userid = bob123.
    cfwild

  • Buliding a SELECT in PSP using fields from html form

    Hi everyone, first of all forgive me my poor english.
    I'm making "CV Base" in PSP as a school project. And I've got a search html form like this (simple version):
    select list: Profession
    text field: Age
    And my question is... How to build a select in psp which will parse only given parameters? For example. I'm looking for C Programmer in any age so i select C Pogrammer from the list and leave afe field blank. So the SELECT should be sth like this: select * from Person where Profession like 'C Programmer'; But in another search i need a programmer who is 25 years old... So select has one more WHERE... I'm sure You all know what I mean
    Please help me.
    Martin

    Hey, i wanna open cursor and don't know how to do this. Got this:
    <%@ plsql parameter="f_wyk" type="varchar2" default="NULL" %>
    <%! sel_str varchar2(1000) := 'SELECT imie, nazwisko, wiek, ulica, nr_domu, nr_lokalu, kod_pocz, miasto, nazwa_woj FROM Uczelnia ucz, Stanowisko stan, Jezyk jez, Wojewodztwo woj, Wyksztalcenie wyk, Adres adr, Osoba os, os_wyk ow, os_jez oj, os_sta ost, os_ucz ou WHERE nazwa_wyk LIKE :1 ...
    <% OPEN cur FOR sel_str USING 'pod%'; %>
    <% LOOP %>
    <% FETCH cur INTO rosoba; %>
    <% EXIT WHEN cur%NOTFOUND; %>
    <%= rosoba.imie %>
    <% END LOOP; %>
    <% CLOSE cur; %>
    and when i put <% OPEN cur FOR sel_str USING *'pod%'; %>* it works but i'cant use parameter <% OPEN cur FOR sel_str USING *<%=f_wyk%>*; %>
    I have
    Projekt\psp>loadpsp -replace -user system/system szukaj2.psp
    ORA-20006: "szukaj2.psp": compilation failed with the following errors.
    "szukaj2.psp", line 100, pos 31: PLS-00103: Encountered the symbol "<" when expecting one of the following:
    ( - + case in mod new not null out <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively-q
    please help

  • MySQL:  SELECT * FROM with a Variable from an HTML form

    Hello,
    I would like to insert the variable "find" from the HTML form below in the MySQL "SELECT * FROM" query beneath it.  In other words, where the word "santafe" appears below, I would like to insert the variable "$find."  But I can't quite get it to work.  How do I do it?
    Thanks in advance,
    John
    <form action="tsearch11.php" method="post">
    <label>Enter Topic:
    <input type="text" name="find" size="55"/>
    <input type="hidden" name="searching" value="yes" />
    <input type="submit" name="search" value="Search" />
    </label>
    </form>
    Then, on tsearch11.php:
    <?
    mysql_connect("mysqlv3", "username", "password") or die(mysql_error());
    mysql_select_db("sand2") or die(mysql_error());
    $find = strip_tags($find);
    $find = trim ($find);
    $t = "SELECT * FROM santafe"; 
    $y = mysql_query($t);
    ?>

    Putting a form variable in a SQL query to look for table or column names requires an extra level of security. You need to create an array of the valid names, and check that the form variable is in that array.
    $find = get_magic_quotes_gpc() ? stripslashes($_POST['find']) : $_POST['find'];
    $find = mysql_real_escape_string(trim($find));
    // create an array of valid table names
    $tables = array('santafe', 'sanfernando', 'guadalupe');
    // check that the variable is in the permitted array
    if (in_array($find, $tables)) {
      $t = "SELECT * FROM $find"; 
      $y = mysql_query($t);
    } else {
      $error = 'Sorry, you selected an invalid table.';
    In the page itself, check whether $y exists before using it. Otherwise display the error:
    if (isset($y)) {
      // display the results
    } elseif (isset($error)) {
      echo $error;

  • How can i fill selection box on html form with data on the clientside?

    hi
    i want to make a html form that reads option values from the client.
    Because there are too many data, it's not reasonable for me to design a page which connects to server each time to fill the selection boxes.Instead i want to check if data resides at the clientside, if so fill selection boxes with that data, if not download it for the first time and store it on the client for later local retrieval.In addition i must be able to update that data residing on the client when i want.

    Don't see where Java comes into this. Sounds like you'd be using JavaScript on the client.
    A cookie would probably be the only way to save data on the client.

  • Is there a way to create reusable HTML Forms that can be used on multiple pages?

    I'm trying to understand the recommended approach to managing 10 HTML forms that will be reused on many different pages.  I want to be able to modify the form definition once and have the change propogate.

    Is your requirement that authors be able to change the form definition, or should form definition be controlled by developers?
    In the case of authors being able to change the form definition then I would say best practice would be to create a page that holds the form definition (using whatever components work for you - either the out of the box form components or something custom). Then use the reference component to point the definition in all the other locations you want the form to appear. One thing to note is if you are using dispatcher for caching you need to make sure you strategy for cache flushing accomadates this approach.
    In the case of developers controlling the form definition you could crate a component for each form, and then simly drag that component onto the pages that require the form. In this case your would control all the form label and description elements in the localization file.

  • Multiple page form to email with sessions doesn't send mail

    I am creating a multiple page form where a user can apply for finance. I am trying to use session to keep the user input values and then the last page sent the application by email.
    My problem is the last step where it doen't send the email. I'm not sure if it the session I'm using is wrong because a simple form without sessions works fine.
    here are the forms
    First page is the input for with variables
    <form action="Finance_form_proposal_Address.php" method="post" >
      <span id="sprycheckbox1">
      <input  name="Disclaimer" type="checkbox" value="yes">
      <span class="checkboxRequiredMsg">Please confirm that you have read and understood the Terms and Conditions.</span></span>
      <div id="F1"><table width="100%" border="1" align="center" cellpadding="3" cellspacing="2">
      <tr>
        <td align="right" bgcolor="#F7E4F8" ><strong>Title:</strong></td>
        <td align="left" bgcolor="#F7E4F8"><select name="Title">
              <option value="Mr">Mr</option>
              <option value="Mrs">Mrs</option>
              <option value="Miss">Miss</option>
              <option value="Ms">Ms</option>
              <option value="Dr">Dr</option>
              <option value="Rev">Rev</option>
            </select></td>
    etc..
    </form>
    The second form:
    Getting values and input new form
    <?php session_start();
    $_SESSION['Disclaimer'] = $_POST['Disclaimer'];
    $_SESSION['Title'] = $_POST['Title'];
    $_SESSION['Forname'] = $_POST['Forname'];
    $_SESSION['Middle_name'] = $_POST['Middle_name'];
    $_SESSION['Surname'] = $_POST['Surname'];
    $_SESSION['email'] = $_POST['email'];
    $_SESSION['DOB'] = $_POST['DOB'];
    $_SESSION['DOB2'] = $_POST['DOB2'];
    $_SESSION['DOB3'] = $_POST['DOB3'];
    $_SESSION['Gender'] = $_POST['Gender'];
    $_SESSION['checkboxGroup1'] = $_POST['checkboxGroup1'];
    $_SESSION['checkboxGroup2'] = $_POST['checkboxGroup2'];
    $_SESSION['home_phone'] = $_POST['home_phone'];
    $_SESSION['mobil'] = $_POST['mobil'];
    $_SESSION['marital_status'] = $_POST['marital_status'];
    $_SESSION['Occupancy'] = $_POST['Occupancy'];
    $_SESSION['Dependants'] = $_POST['Dependants'];
    ?>
    Form on second page
    <form action="Finance_form_proposal_Bank_Details_employment.php" method="post"> <input  name="Disclaimer" type="checkbox" value="yes">
        <div id="F1"><table width="100%" border="1" align="center" cellpadding="3" cellspacing="2">
      <tr>
        <td align="right" bgcolor="#F7E4F8" ><strong>Correspondence Address:</strong></td>
        <td align="left" bgcolor="#F7E4F8"><input name="Correspondence" type="checkbox" id="Correspondence" value="yes" checked="CHECKED">
          <label for="Correspondence"></label></td>
      </tr>
      <tr>
        <td bgcolor="#F7E4F8"><strong>Street:</strong></td>
        <td bgcolor="#F7E4F8"><input name="Street" type="text"></td>
      </tr>
      <tr>
        <td bgcolor="#F7E4F8"><strong>District:</strong></td>
        <td bgcolor="#F7E4F8"><input name="District" type="text"></td>
      </tr>
      <tr>
        <td bgcolor="#F7E4F8"><strong>Town:</strong></td>
        <td bgcolor="#F7E4F8"><input name="Town" type="text"></td>
      </tr>
    etc ..
    </form
    Third page
    Getting values
    session_start();
    $_SESSION['Correspondence'] = $_POST['Correspondence'];
    $_SESSION['Street'] = $_POST['Street'];
    $_SESSION['District'] = $_POST['District'];
    $_SESSION['Town'] = $_POST['Town'];
    $_SESSION['County'] = $_POST['County'];
    $_SESSION['Country'] = $_POST['Country'];
    $_SESSION['Years'] = $_POST['Years'];
    $_SESSION['Months'] = $_POST['Months'];
    $_SESSION['Street2'] = $_POST['Street2'];
    $_SESSION['District2'] = $_POST['District2'];
    $_SESSION['Town2'] = $_POST['Town2'];
    $_SESSION['County2'] = $_POST['County2'];
    $_SESSION['Country2'] = $_POST['Country2'];
    $_SESSION['Years2'] = $_POST['Years2'];
    $_SESSION['Months2'] = $_POST['Months2'];
    $_SESSION['Street3'] = $_POST['Street3'];
    $_SESSION['District3'] = $_POST['District3'];
    $_SESSION['Town3'] = $_POST['Town3'];
    $_SESSION['County3'] = $_POST['County3'];
    $_SESSION['Country3'] = $_POST['Country3'];
    $_SESSION['Years3'] = $_POST['Years3'];
    $_SESSION['Months3'] = $_POST['Months3'];
    Then there is a another form to fill in , wont show that as it is in principle the same.
    This is the last page that should sent the data to email:
    <?php
    session_start();
    /* Subject mail variables */
    $emailsubject = 'Finance application from PandKshop';
    $webmaster = '[email protected]';
    /* Gathering Data */
    $goods = $_POST['goods'];
    $amount = $_POST['amount'];
    $Total_Cash = $_POST['Total_Cash'];
    $Deposit = $_POST['Deposit'];
    $Balance = $_POST['Balance'];
    $Payments = $_POST['Payments'];
    $Diclaimer = $_SESSION['Disclaimer'];
    $Title = $_SESSION['Title'];
    $Forname = $_SESSION['Forname'];
    $Middle_name = $_SESSION['Middle_name'];
    $Surname = $_SESSION['Surname'];
    $email = $_SESSION['email'];
    $DOB = $_SESSION['DOB'];
    $DOB2 = $_SESSION['DOB2'];
    $DOB3 = $_SESSION['DOB3'];
    $Gender =  $_SESSION['Gender'];
    $CheckboxGroup1 = $_SESSION['CheckboxGroup1'];
    $CheckboxGroup2 = $_SESSION['CheckboxGroup2'];
    $home_phone = $_SESSION['home_phone'];
    $mobil_phone = $_SESSION['mobil_phone'];
    $marital_status = $_SESSION['marital_status'];
    $Occupancy = $_SESSION['Occupancy'];
    $Dependants = $_SESSION['Dependants'];
    $Correspondence = $_SESSION['Correnspondence'];
    $Street = $_SESSION['Street'];
    $District = $_SESSION['District'];
    $Town = $_SESSION['Town'];
    $County = $_SESSION['County'];
    $Country = $_SESSION['Country'];
    $Years = $_SESSION['Years'];
    $Months = $_SESSION['Months'];
    $Street2 = $_SESSION['Street2'];
    $District2 = $_SESSION['District2'];
    $Town2 = $_SESSION['Town2'];
    $County2 = $_SESSION['County2'];
    $Country2 = $_SESSION['Country2'];
    $Years2 = $_SESSION['Years2'];
    $Months2 = $_SESSION['Months2'];
    $Street3 = $_SESSION['Street3'];
    $District3 = $_SESSION['District3'];
    $Town3 = $_SESSION['Town3'];
    $County3 = $_SESSION['County3'];
    $Country3 = $_SESSION['Country3'];
    $Years3 = $_SESSION['Years3'];
    $Months3 = $_SESSION['Months3'];
    $Sort_Code          = $_SESSION['Sort_Code'];
    $Account = $_SESSION['Account'];
    $Years_with_Bank = $_SESSION['Years_with_Bank'];
    $Months_with_Bank = $_SESSION['Months_with_Bank'];
    $CreditCard = $_SESSION['CreditCard'];
    $ChequeCard = $_SESSION['ChequeCard'];
    $Employment = $_SESSION['Employment'];
    $income = $_SESSION['Income'];
    $Income2 = $_SESSION['Income2'];
    $Occupation = $_SESSION['Occupation'];
              $Body = <<<EOD
    <br><hr><br>
    Goods: $goods <br>
    Amount: $amount <br>
    Total Cash: $Total_Cash <br>
    Deposit: $Deposit <br>
    Balance: $Balance
    Nine Monthly Payments of : £ $Payments
    Title: $Title <br>
    Forname: $Forname <br>
    Middle Name: $Middle_name <br>
    Surname : $Surname <br>
    Email: $email <br>
    DOB: $DOB/$DOB2/$DOB3 <br>
    Gender: $Gender <br>
    Home_phone: $CheckboxGroup1 Mobile phone: $CheckboxGroup2 <br>
    Home Phone number: $home_phone <br>
    Mobile Phone number: $mobil_phone <br>
    Marital_Status: $marital_status <br>
    Occupancy : $Occupancy <br>
    Dependants: $Dependants <br>
    Correspondence Address: $Correspondence <br>
    Street: $Street <br>
    District: $District <br>
    Town: $Town <br>
    County: $County <br>
    Country: $Country
    Years: $Years
    Months: $Months
    Street2: $Street <br>
    District2: $District2 <br>
    Town2: $Town2 <br>
    County2: $County2 <br>
    Country2: $Country2
    Years2: $Years2
    Months2: $Months2
    Street3: $Street3 <br>
    District3: $District3 <br>
    Town3: $Town3 <br>
    County3: $County3 <br>
    Country3: $Country3 <br>
    Years3: $Years3 <br>
    Months3: $Months3 <br>
    Sort Code: $Sort_Code <br>
    Account: $Account <br>
    Years with the Bank: $Years_with_Bank <br>
    Months with the Bank: $Months_with_Bank <br>
    CreditCards: $CreditCard <br>
    Cheque Card: $ChequeCard <br>
    Employment: $Employment <br>
    Income: £$income <br>
    Income Frequency: $Income2 <br>
    Occupation: $Occupation <br>
    EOD;
              $headers = "From: $email\r\n";
              $headers .= "content-type: text/html\r\n";
              $succes = mail($webmaster, $emailsubject, $Body, $headers);
    session_destroy();
    /* Results rendered as HTML */
    $theResults = <<<EOD
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
          <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
          <title>Thank you! The Piano and Keyboard Shop Online</title>
          <link rel="STYLESHEET" type="text/css" href="contact.css">
          <link href="The Piano and Keyboard Shop.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <h2>Thanks for your application!<br />
    We endavour to get back to you as soon as possible with application results</h2>
    Please contact us on 0116 2541053 if you have any questions regarding your finance application
    Return to <a href="../index_main.php">Home Page</a>
    <div id="advertising">
        <div id="add_left"><a href="Contact.php">Contact us</a><br>
          <a href="About.php">About us</a><br>
          <a href="Finance.php">Finance</a><br>
    </div>
        <div id="adds_middle"><a href="term-conditions.php">Terms and Conditions</a><br>
          <a href="Privacy-Policy.php">Privacy Conditions</a><br>
          <a href="FAQ.php">FAQ</a><br>
    </div>
        <div id="adds_right"><a href="http://www.youtube.com/user/KeysoundWebsite">Follow us on YouTube</a><br>
          <a href="https://twitter.com/KeysoundUK">Follow us on Twitter</a><br>
          <a href="https://www.facebook.com/pages/Keysound/163590297024385">Follow us on Face book</a><br>
    </div>
      </div>
      <div id="advertising"> <div id="copy"><img src="files/Images/copyright.gif" width="19" height="22">
    </div> </div>
    </body>
    </html>
    EOD;
    echo "$theResults";
    ?>
    Is there something wrong with my sessions or just something in the code?

    Standard Apple Mail. I'm running Yosemite 10.10.1, and I'm amazed to see that About Mail says it's Mail Version 8.1 (1993), copyright 1995-2014 Apple Inc. 
    Interesting thought, do you think that it doesn't like to work with itself?  Actually, I'm fairly sure I've had the problem inside of other apps but I should document that.  I'll keep notes to see where this happens. 

  • How can an applet retrieve the values of a HTML form shown in a JEditorPane

    Hi,
    I'm doing an applet that contains a JTree and a JEditorPane
    among other components. Each node of the JTree represents some
    information that is stored in a database, and whenever a JTree
    node is selected, this information is recovered and shown in
    the JEditorPane with a html form. To make the html form,
    the applet calls a servlet, which retrieves the information of
    the node selected from the database. This information is stored
    like a XML string, and using XSLT, the servlet sends the html
    form to the applet, which shows it in the JEditorPane.
    My problem is that I don't know how I can recover new values
    that a user of the application can introduce in the input fields
    of the html form. I need to recover this new values and send them
    to another servlet which store the information in the database.
    If someone could help me I'd be very pleased.
    Eduardo

    At least I found a fantastic example. Here it is:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.net.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    public class FormSubmission extends JApplet {
    private final static String FORM_TEXT = "<html><head></head><body><h1>Formulario</h1>"
    + "<form action=\"\" method=\"get\"><table><tr><td>Nombre:</td>"
    + "<td><input name=\"Nombre\" type=\"text\" value=\"James T.\"></td>"
    + "</tr><tr><td>Apellido:</td>"
    + "<td><input name=\"Apellido\" type=\"text\" value=\"Kirk\"></td>"
    + "</tr><tr><td>Cargo:</td>"
    + "<td><select name=\"Cargo\"><option>Captain<option>Comandante<option>General</select></td>"
    + "</tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Enviar\"></td>"
    + "</tr></table></form></body></html>";
    protected HashMap radioGroups = new HashMap();
    private Vector v = new Vector();
    public FormSubmission() {
    getContentPane().setLayout(new BorderLayout());
    JEditorPane editorPane = new JEditorPane();
    editorPane.setEditable(false);
    editorPane.setEditorKit(new HTMLEditorKit()
    public ViewFactory getViewFactory() {
    return new HTMLEditorKit.HTMLFactory() {
    public View create(Element elem) {
    Object o = elem.getAttributes().getAttribute(javax.swing.text.StyleConstants.NameAttribute);
    if (o instanceof HTML.Tag)
    HTML.Tag kind = (HTML.Tag) o;
    if (kind == HTML.Tag.INPUT || kind == HTML.Tag.SELECT || kind == HTML.Tag.TEXTAREA)
    return new FormView(elem)
    protected void submitData(String data)
    showData(data);
    protected void imageSubmit(String data)
    showData(data);
    // Workaround f�r Bug #4529702
    protected Component createComponent()
    if (getElement().getName().equals("input") &&
    getElement().getAttributes().getAttribute(HTML.Attribute.TYPE).equals("radio"))
    String name = (String) getElement().getAttributes().getAttribute(HTML.Attribute.NAME);
    if (radioGroups.get(name) == null)
    radioGroups.put(name, new ButtonGroup());
    ((JToggleButton.ToggleButtonModel) getElement().getAttributes().getAttribute(StyleConstants.ModelAttribute)).setGroup((ButtonGroup) radioGroups.get(name));
    JComponent comp = (JComponent) super.createComponent();
    // Peque�a mejora visual
    comp.setOpaque(false);
    return comp;
    return super.create(elem);
    //editorPane.setText(FORM_TEXT);
    editorPane.setText(texto);
    getContentPane().add(new JScrollPane(editorPane), BorderLayout.CENTER);
    private void showData(String data) {
         // ergebnis significa resultado
    StringBuffer ergebnis = new StringBuffer("");
    StringTokenizer st = new StringTokenizer(data, "&");
    while (st.hasMoreTokens()) {
    String token = st.nextToken();
    String key = URLDecoder.decode(token.substring(0, token.indexOf("=")));
    String value = URLDecoder.decode(token.substring(token.indexOf("=")+1,token.length()));
    v.add(value);
    ergebnis.append(" "); ergebnis.append(key); ergebnis.append(": "); ergebnis.append(value); ergebnis.append(" ");
    ergebnis.append(" ");
    JOptionPane.showMessageDialog(this, ergebnis.toString());
    public static void main(String[] args) throws Exception {
    JFrame frame = new JFrame ();
    FormSubmission editor = new FormSubmission ();
    frame.getContentPane().add(editor);
    frame.pack();
    frame.show();
    }

  • Passing multiple values to select-option low by submit at one go from zpro.

    Hi all,
    I have a requirement pass descrete multiple values form my z-program to to select-option low on selction screen of standard SAP program using SUBMIT statment at one go.At the same time select-option high will be empty.I will be thankful if anybody can help me in this regard.
    Sandeep.

    Hi Check this link...on submitting programs
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9d7535c111d1829f0000e829fbfe/frameset.htm
    here is the code . we are calling the same program....you can call any other program as well.
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.

  • How to retrieve data from the HTML form in the JEditorPane?

    I could quite easily use JEditorPane to render and display a simple HTML file.
    My HTML looks like this:
    <html>
    <head>
    <title> simple form</title>
    </head>
    <body bgcolor="cccccc">
    <center><h1>SURVEY THING</h1>
    </center>
    <form id="survey">
    <p>1.Type something in.</p>
    <textarea cols=25 rows=8>
    </textarea>
    <BR>
    <p>2.Pick ONLY one.</p>
    <input type="radio" name="thing" value="0" Checked> NO choice <BR>
    <input type="radio" name="thing" value="1"> First choice <BR>
    <input type="radio" name="thing" value="2"> Second choice
    <BR>
    <p>3.Pick all you like.</p>
    <input type="checkbox" name="stuff" value="A"> A <BR>
    <input type="checkbox" name="stuff" value="B"> B <BR>
    <input type="checkbox" name="stuff" value="C"> C <BR>
    <input type="submit" value="give data">
    <input type="reset" value="do clensing">
    </form>
    </body>
    </html>
    It gets diplayed fine and I can type in text, select radio buttons (they behave mutualy-exclusive,
    as they should) and check checkboxes.
    The problem I have is with retrieving the values which were entered into the form.
    If I, after editing, try to write the html to the file using HTMLWriter,
    it records the changes I made into the textarea, however all the radio and checkbox selections are lost.
    Maybe the problem is that when I enter the values I do not use any methods like
    insertBeforeStart and so on, but I believe I shouldn't need to use them to populate a form.
    Especially I never change the structure of the HTML.
    Also, when I try to traverse the Element tree and see the input elements attributes,
    I can never see a change in the entered values. However it is probably b/c I am traversing through
    the model and the changes are in the view (just a guess.)
    Anyway, if anybody could direct me onto the right path: how to retrieve the values typed in the form,
    or if it is possible at all in the JEditorPane, I would greatly appreciate.
    thanks
    maciej
    PS. I have seen the answer to a similar question posted some time last year. However, I am trying
    to find a soultion which allows forms/surveys to be built by people who have no java and only basic
    html knwledge. And Axualize way is probably a little bit too "high-tech."

    Maybe helpful for u.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Container;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    public class TestHtmlInput extends JFrame {
         JEditorPane pane=new JEditorPane();
         public TestHtmlInput() {
              super();
              pane.setEditorKit(new HTMLEditorKit());
              pane.setText("<HTML><BODY><FORM>" +
              "<p>1.Input your name.</p>" +
              "<INPUT TYPE='text' name='firstName'>" +
              "<p>2.Input your information.</p>" +
              "<TEXTAREA rows='20' name='StationDescriptions' cols='100'>" +
              "<p>3.Pick ONLY one.</p>" +
              "<input type='radio' name='thing' value='0' Checked> NO choice <BR>" +
              "<input type='radio' name='thing' value='1'> First choice <BR>" +
              "<input type='radio' name='thing' value='2'> Second Choice <BR>" +
              "<p>4.Pick all you like.</p>" +
              "<input type='checkbox' name='stuff' value='A'> A <BR>" +
              "<input type='checkbox' name='stuff' value='B'> B <BR>" +
              "<input type='checkbox' name='stuff' value='C'> C <BR>" +
              "<p>5.Choose your nationality.</p>" +
              "<select name='natio'>" +
              "<option>12</option>" +
              "<option selected>13</option>" +
              "</select>" +
              "</FORM></BODY></HTML>");
              this.getContentPane().add(new JScrollPane(pane));
              JButton b=new JButton("print firstName text");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        System.out.println("Number of Components in JTextPane: " + pane.getComponentCount());
                        for (int i = 0; i <  pane.getComponentCount(); i++) {
                             //NOTE FOR BELOW: know its a Container since all Components inside a JTextPane are instances of the inner class
                             //ComponentView$Invalidator which is a subclass of the Container Class (ComponentView$Invalidator extends Container)
                             Container c = (Container)pane.getComponent(i);
                             //the component of this containers will be the Swing equivalents of the HTML Form fields (JButton, JTextField, etc.)
                             //Get the # of components inside the ComponentView$Invalidator (the above container)
                             Component swingComponentOfHTMLInputType = c.getComponent(0);
                             //each ComponentView$Invalidator will only have one component at array base 0
                             //DISPLAY OF WHAT JAVA CLASS TYPE THE COMPONENT IS
                             System.out.println(i + ": " + swingComponentOfHTMLInputType.getClass().getName());
                             //this will show of what type the Component is (JTextField, JRadioButton, etc.)
                             if (swingComponentOfHTMLInputType instanceof JTextField) {
                                  JTextField tf = (JTextField)swingComponentOfHTMLInputType;
                                  //downcast and we have the reference to the component now!! :)
                                  System.out.println("  Text: " + tf.getText());
                                  tf.setText("JTextField found!");
                             } else if (swingComponentOfHTMLInputType instanceof JButton) {
                             } else if (swingComponentOfHTMLInputType instanceof JComboBox) {
                                     JComboBox combo = (JComboBox)swingComponentOfHTMLInputType;
                                     System.out.println("  Selected index: " + combo.getSelectedIndex());
                                } else if (swingComponentOfHTMLInputType instanceof JRadioButton) {
                                     JRadioButton radio = (JRadioButton)swingComponentOfHTMLInputType;
                                     System.out.println("  Selected: " + new Boolean(radio.isSelected()).toString());
                             } else if (swingComponentOfHTMLInputType instanceof JCheckBox) {
                                     JCheckBox check = (JCheckBox)swingComponentOfHTMLInputType;
                                     check.setSelected(true);
                                     System.out.println("  Selected: " + new Boolean(check.isSelected()).toString());
                             } else if (swingComponentOfHTMLInputType instanceof JScrollPane) {
                                  JScrollPane pane = (JScrollPane)swingComponentOfHTMLInputType;
                                  for (int j=0; j<pane.getComponentCount(); j++) {
                                       //JTextArea area = (JTextArea)swingComponentOfHTMLInputType.getComponent(0);
                                       Container c2 = (Container)pane.getComponent(j);
                                       for (int k=0; k<c2.getComponentCount(); k++) {
                                            Component c3 = (Component)c2.getComponent(k);
                                            if (c3 instanceof JTextArea) {
                                                 JTextArea area = (JTextArea)c3;
                                                 System.out.println("  " + area.getClass().getName());
                                                 System.out.println("     Text: " + area.getText());
                                                 area.setText("JTextArea found!");
                             } else {
              this.getContentPane().add(b,BorderLayout.SOUTH);
         public static void main(String args[]) {
              TestHtmlInput app = new TestHtmlInput();
              app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              app.setSize( 400, 900 );
              app.setVisible( true );
    }

  • Can you have multiple contact forms in a single Muse site?

    I have a site created in Muse that needs to use multiple contact forms of a sort.  One is a simple contact form.  Two others are sign up forms. In two of the three forms I have to separate the First and Last names.  Also in those there are multiple Custom fields and Message fields.
    The original simple contact form is working fine and has been.  However, I modified one of the pages by adding a second form, the first of the two sign-up forms.  It looked great in Muse, but when uploaded to the site, all of the fields were gone, leaving only the Labels in a single paragraph.
    Does this mean I can't have multiple contact forms in a single site?  If I actually, can, then what might have caused the problem?  And what could you suggest for me to try to fix it?
    Thank you,
    Laura

    Thank you for the information, but I cannot find anywhere in help where to find the field names (if that is my problem).  I changed all the labels and the corresponding text inside the field (remember, Muse does not give access to code as far as I can tell).  When I preview the page in a browser (using FireFox as default, but also tried with IE), everything looks good.  When I export to html and open the index.html on my computer, everything still looks great.  But when I FTP the page to the website, this is what I get:
    First Name:RequiredRescuer Email:RequiredOrganization (if any):RequiredSubmitting Form...The server encountered an error.Form received.Geographic Areas Covered:RequiredRescuer Cell Phone:RequiredRescuer Home Phone:RequiredRescuer Home Address:
    RequiredRescuer City:RequiredRescuer State:RequiredRescuer Zip code:RequiredRescuer Country:RequiredVeterinarian Name:RequiredVet Address:RequiredVet City & State:RequiredVet Phone:RequiredRequiredServices Offered:RequiredAdditional Info About You:Required Rescuer (available to general public) RequiredVolunteer (available only to Rescuers)RequiredPhoneRequiredEmailRequiredOtherRequiredLast Name:RequiredImage Verification:Required
    How would you prefer to be listed?
    How would you prefer to be contacted?
    However, this is how it looks on the preview:
    So, what is my problem?  And how can I fix it?
    Thank you,
    Laura

  • Using xsgl:insert-request to insert non-English character data from HTML form

    I tried to insert a text written in French and pasted into an HTML form into my database following the recipe from the XSQL release notes.
    The table:
    create table content_object (
    id number(9) constraint pk_content_object primary key,
    author number(9),
    title varchar2(256),
    abstract varchar2(1024),
    object_type_id number(9),
    content_meat clob,
    XML file the form is posted to:
    <?xml version="1.0"?>
    <xsql:insert-request connection="demo"
    xmlns:xsql="urn:oracle-xsql"
    table="content_object"
    transform="article_form_to_content_object.xsl"/>
    article_form_to_content_object.xsl:
    <?xml version = '1.0'?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="request/parameters">
    <ROW>
    <TITLE><xsl:value-of select="title_field"/></TITLE>
    <ABSTRACT><xsl:value-of select="abstract_field"/></ABSTRACT>
    <CONTENT_MEAT><xsl:value-of select="content_field"/></CONTENT_MEAT>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    The result was:
    <ROW num="2">
    <ID>6</ID>
    <TITLE>Le go</TITLE>
    <ABSTRACT>Vin bouchonn</ABSTRACT>
    <CONTENT_MEAT>Des conditions de conservation au tant d</CONTENT_MEAT>
    </ROW>
    All strings were cropped at the point where the first accented character appeared.
    Any idea why this is happening? With English texts it works just fine.
    Maciej

    Another user hit this problem this week. I debugged it and posted the reply in the discussion thread:
    http://technet.oracle.com:89/ubb/Forum11/HTML/002799.html
    It's a JDK bug in character set conversion that has a simple workaround, just indicate the ISO-8859-1 encoding on your XSQL page. See the end of this other thread for details.

  • Is there a way to import a choice list in multiple (or single) selection fields?

    Is there a way to import a previously created choice list in multiple (or single) selection fields in forms central? 

    Hello Dr. Ryan,
    Unfortunately there is no way to move this data into FormsCentral.
    As far as your question about using PDFs with FormsCentral, 'soon' is actually 'now'! You have two options:
    1) Author a new form with FormsCentral. From the distribute tab, save a submission-enabled PDF form. You can send this form out to your recipients and their responses will be collected on FormsCentral.
    2) Import an exsiting PDF form into FormsCentral from the dashboard, and then submission-enable it. Distribute the submission-enabled version and responses will be collected on FormsCentral.
    Thanks!
    Shannon

  • How to use an html form to search my database??

    Hey guys,
    I'm going through 100's of tutorials on creating a PHP CMS structure for my website and did manage to build a very simple 1. I have 1 question that i need your help with. I was browsing through websites on Google and discovered this website that you can search their data base with a an html form. How can I achieve this in the most simplest ways.
    Site URL: http://www.istructe.org/yearbook/index.asp
    Yours
    Ashveer

    The form's data is submitted to a php script.  The script harvests the data and formulates a SQL select statement -
    SELECT * FROM TABLE WHERE fieldname1 = fieldvalue1 AND fieldname2 = fieldvalue2....
    (the form's fields are used to build the WHERE part of the statement)
    After executing the search the script looks at the number of records found.  If that is zero, there were no matches.  If there is 1 or more records found, each is printed to the page.  You would need some facility with a server scripting language to do this, although not too much.  It's fairly simple.

Maybe you are looking for

  • How to use external query in subreport?

    I would like to use report builder to display a simple report containing a one to many relationship. For example, a list of customer orders where each customer order can consist of many ordered items. The queries for this report must be external.  Is

  • Unwanted spaces at top of columns using Dreamweaver 4

    In working on a homepage I manage with one wide and one narrow column, chunks of space intrude themselves at the top of either or both columns. I try adding and deleting spaces at the bottom. I also use modify-table-clear cell heights. Any idea what'

  • Finder creates file in trash which can not be deleted.

    Hi, I am experiencing a weird problem after forcing leopard to reboot. The trash can icon is now always shown as full. If I open the trash can in the finder there is a file named ␀␀␀␀␀.úÉ The strange thing is if i open the .Trash folder with a term

  • Form response tables

    Hello, Is it possible to add tables in your View Responses tab that are also linked to the form fields? Right now the All Responses table has columns that are linked to Form fields, but when you add a new table I cannot seem to find the option to add

  • I have an old imac 27' with OS 10.7. What will happen with lightroom 6 ?

    I have an old imac 27 ' with mac os 10.7. I try creative cloud and lightroom 5. It works perfectly... But what will happen with lightroom 6 ?