Http Session combing HTML forms and List / Menu Components

My problem is the following one... I have a .jsp page that includes a form with three List / Menu Components. I want my second List / Menu Component to be filled with data depending on the selection I have made to the first List / Menu Components. (Of course there is a MYSQL database behind). And I want the third List Menu Component to be filled with data depending on the selection I have made to the second one.

Three options:
1) use incredibly large javascript arrays to hold the data for the second and third lists and use onChange events in the first and second list to alter the list contents based on selection
2) use ajax calls to fetch the data for the second and third list, still using javascript events to listen for selections.
3) do a form submit on each selection and fill the lists server side.
The third option is of course by far the easiest, but that will give you submits in between that you may not want. Ajax is a good solution to this problem in my opinion.

Similar Messages

  • Please help! How can I validate Radio Buttons and List Menu with PHP.

    Hello everyone, I have been learning PHP step by step and
    making little projects.
    The point is I find it easy to learn by doing "practical
    projects."
    I have been reading the David Powers's Book on PHP Solutions
    and it's really great, however there is nothing mentioned regarding
    Validating Radio buttons. I know the book cannot cover every aspect
    of PHP and maybe someone in here can help.
    I have been learning how to process HTML forms with PHP.
    The problem is every book or tutorial I have read or
    encountered fall short on validation.
    I'm wondering how I can learn to validate Radio Buttons and
    Select List Menu.
    I have managed to create validation for all other fields but
    have no clue as to how I can get validation for Radio Buttons and
    List Menu.
    I would also like an error message echoed when the user does
    not click a button or make a selection and try to submit the form.
    I would appreciate any help.
    Patrick

    It's not that default value is "None." In fact it's not. It
    will only be
    "none" when the form is submitted.
    Also if your submit button is names 'send' then
    $_POST['send'] will only be
    set if the form was submitted.
    Make sure you didn't hit the refresh button on your browser
    which usually
    reposts the information. Also make sure you did not reach the
    form from
    another form with the same button names.
    Otherwise paste the snippet.
    Also you can check what fields are set in the post array by
    adding this to
    the top of (or anywhere on) your page:
    print_r($_POST);
    Cosmo
    "Webethics" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Off the top of my head this should be no different than
    your radio buttons
    > except that 'productSelection' will always fail the
    !isset check when the
    > form is submitted since the default value is "None", and
    therefore always
    > set. :-)
    >
    > So how about this..?
    > <?php
    > if (isset($_POST['send']) and
    ($_POST['productSelection'] == "None"))
    > {echo "Please select a product.";}
    > ?>
    >
    >
    >
    >
    > "Webethics" <[email protected]> wrote
    in message
    > news:[email protected]...
    > > Another question - how do i applied the code you
    just showed me to
    > > select
    > > menu
    > > or select list?
    > >
    > > This is the list:
    > >
    > > <div class="problemProduct">
    > > <label for="productSelection"><span
    class="product_label">Product
    > > Name.</span></label>
    > > <select name="productSelection" id="products"
    class="selection">
    > > <option value="None">-------------Select a
    product----------</option>
    > > <option value="Everex DVD Burner">Everex DVD
    Burner</option>
    > > <option value="Vidia DVD Burner">Vidia DVD
    Burner</option>
    > > <option value="Excerion Super Drive">Excerion
    Super Drive</option>
    > > <option value="Maxille Optical Multi
    Burner">Maxille Optical Multi
    > > Burner</option>
    > > <option value="Pavilion HD Drives">Pavilion
    HD Drives</option>
    > > </select>
    > > </div>
    > >
    > > I thought I could just change the name is the code
    from operatingSystem
    > > to
    > > productSelection.
    > >
    > > Something like this:
    > >
    > > From this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['operatingSystem']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > To this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['productSelection']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > But this does not work, any ideas?
    > >
    > > Patrick
    > >
    >
    >
    >
    >
    > Hey, I tried this about but as you mentioned, since the
    default product
    > value
    > is "None" an error message appears when the page loads.
    >
    > Is there a way to code this things so that even though
    the default value
    > is
    > "None" there ia no error message untle you hit the
    submit?
    >
    > When I applied the code, it messes up the previous code,
    now the operating
    > system is requiring an entry on page load.
    >
    > When I remove the code from the list menu everything
    goes back to normal.
    >
    > I know this is a little much but I have no other
    alternatives.
    >
    > Patrick
    >

  • Images in HTML forms and/or reports

    Hi,
    Apologies if a stupid question, but can you display a combination of data and image content in Portal HTML forms and/or reports? If so, how?
    This question assumes that the image in question is browser-supported (e.g. gif file), and the link to it is in the same database table as the data being reported (as a bfile data type).
    Alternatively, what if the image was actually directly stored in the database table as a BLOB data type?
    Help!
    Cheers, Jeff

    Hi Sharmila,
    Thanks for the info!
    Would this also work if the image wasn't a blob, but instead just stored on the filesystem (as a gif file), with the reference to it stored in the database as a bfile datatype?
    Thanks once again, Jeff
    Hi,
    You can build portal forms to upload images. You can use blob columns here. You can also have images in a report. This will be the SQL to query data from tables having intermedia data.
    Select a.empno,a.ename,a.mgr,a.sal,
    portal30.wwv_user_utilities.get_intermedia('EMP','EMP_AUDIO','AUDIO',a.rowid)
    the_audio, b.dname,b.loc,
    portal30.wwv_user_utilities.get_intermedia('DEPT','DEPT_PICTURE','IMAGE',b.rowid) the_picture
    from emp a, dept b
    where a.deptno = b.deptno
    The table should have the ordimage column type.
    Thanks,
    Sharmila

  • HTML Forms and Procedures

    Hello!
    We are trying out APEX for the first time. We would like to keep our business data objects in a different schema from the APEX schema. I have been able to successfuly create a proc and create a form over the proc in the differenet schema.
    I'm wondering if we can create HTML forms and later reference the procedure. The goal is to have the Database Developers create the procs while the developers create the forms at their own pace, then later wire that form to the proc. I hope this makes sense!!
    Thx!

    I resolved this on my own. Pretty simple, just new at this.

  • HTML forms and tables w/Oracle

    Hi,
    New to Oracle - used AMP before.
    My new organization does not use any open source so PHP is out. I assume I could use .net or java instead to DB query from HTML forms and render DB results to HTML tables.
    But besides .net and java are there any other languages that work well with Oracle for this purpose?
    Thanks,
    Lee G.

    hi,
    you can use the pl/sql web tool kit to develop web applications

  • 500 erro on Forms and Lists NXT_getResource

    For some reason when i upgraded to addt 1.0.0.0 when i create a dynamic form or list i get an internal server error
    <br />After debugging i found that if i remove all the NXT_getResources from the page the page displays correctly but some of the fuctionality is lost
    <br />this is using vb script and connecting to an access database.
    <br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <br />
    <!--#include file="Connections/*************.asp" -->
    <br />
    <!--#include file="includes/common/KT_common.asp" -->
    <br />
    <!--#include file="includes/tfi/TFI.asp" -->
    <br />
    <!--#include file="includes/tso/TSO.asp" -->
    <br />
    <!--#include file="includes/nav/NAV.asp" -->
    <br /><%<br />' Filter<br />  Dim tfi_listCustomers2: Set tfi_listCustomers2 = new TFI_TableFilter<br />  tfi_listCustomers2.Init MM_conDatabaseAdvanced_STRING, "tfi_listCustomers2"<br />  tfi_listCustomers2.addColumn "Customers.Last_Name", "STRING_TYPE", "Last_Name", "%"<br />  tfi_listCustomers2.addColumn "Customers.First_Name", "STRING_TYPE", "First_Name", "%"<br />  tfi_listCustomers2.Execute()<br /><br />' Sorter<br />  Dim tso_listCustomers2: Set tso_listCustomers2 = new TSO_TableSorter<br />  tso_listCustomers2.Init "rslistCustomers2", "tso_listCustomers2"<br />  tso_listCustomers2.addColumn "Customers.Last_Name"<br />  tso_listCustomers2.addColumn "Customers.First_Name"<br />  tso_listCustomers2.setDefault "Customers.Last_Name"<br />  tso_listCustomers2.Execute()<br /><br />' Navigation<br />  Dim nav_listCustomers2: Set nav_listCustomers2 = new NAV_Regular<br />  nav_listCustomers2.Init "nav_listCustomers2", "rsCustomers1", "", Request.ServerVariables("URL"), 10<br />%>
    <br /><%<br />Dim rsCustomers1__NXTFilter<br />rsCustomers1__NXTFilter = "1=1"<br />If ((Session("filter_tfi_listCustomers2") <> "")) Then <br />  rsCustomers1__NXTFilter = Session("filter_tfi_listCustomers2")<br />End If<br /><br />Dim rsCustomers1__NXTSort<br />rsCustomers1__NXTSort = "Customers.Last_Name"<br />If ((Session("sorter_tso_listCustomers2") <> "")) Then <br />  rsCustomers1__NXTSort = Session("sorter_tso_listCustomers2")<br />End If<br /><br />Dim rsCustomers1<br />Dim rsCustomers1_cmd<br />Dim rsCustomers1_numRows<br />Dim rsCustomers1_cmd_query<br /><br />Set rsCustomers1_cmd = Server.CreateObject ("ADODB.Command")<br />rsCustomers1_cmd.ActiveConnection = MM_conDatabaseAdvanced_STRING<br />rsCustomers1_cmd_query = "SELECT Customers.Last_Name, Customers.First_Name, Customers.Customer_ID FROM Customers WHERE " + rsCustomers1__NXTFilter + " ORDER BY " + rsCustomers1__NXTSort + "" <br />rsCustomers1_cmd.CommandText = rsCustomers1_cmd_query<br />rsCustomers1_cmd.Prepared = true<br /><br />Set rsCustomers1 = rsCustomers1_cmd.Execute<br />rsCustomers1_numRows = 0<br />%>
    <br /><%<br />Dim RepeatrsCustomers1__numRows<br />Dim RepeatrsCustomers1__index<br /><br />RepeatrsCustomers1__numRows = 0 + Session("max_rows_nav_listCustomers2")<br />RepeatrsCustomers1__index = 0<br />rsCustomers1_numRows = rsCustomers1_numRows + RepeatrsCustomers1__numRows<br />%>
    <br /><%<br />nav_listCustomers2.checkBoundries()<br />%>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br />
    <script src="includes/nxt/scripts/list.js" type="text/javascript"></script>
    <br />
    <script src="includes/nxt/scripts/list.js.asp" type="text/javascript"></script>
    <br />
    <script type="text/javascript"></script>$NXT_LIST_SETTINGS = {
    <br /> duplicate_buttons: false,
    <br /> duplicate_navigation: false,
    <br /> row_effects: false,
    <br /> show_as_buttons: false,
    <br /> record_counter: false
    <br />}
    <br />
    <br /> /* Dynamic List row settings */
    <br /> .KT_col_Last_Name {width:140px; overflow:hidden;}
    <br /> .KT_col_First_Name {width:140px; overflow:hidden;}
    <br />
    <br />
    <br />
    <br />
    <br />
    <div class="KT_tng"></div>

    "least 500 Forms Build On Form 6 And I Need To Migrate This Forms To Form 6 .nice"
    Can you confirm what version you are moving FROM and which version you are moving TO (and also any error messages).
    Thanks
    Grant Ronald
    Forms Product Management

  • HTML form and java

    Hi,
    I have been pulling my hair out for the past week on this with no suces EVEN after forum searching, googling ..........
    Here is the problem:
    I have an HTML form of the following type and need to pass in a Javascript variable to the servlet called on hitting the submit button.
    <script>document.write('<form name="Test" method="get" onSubmit="return chkfields(this)" action="/servlet/NewServlet?ABC='+unescape(params["ABC"])+'">')</script>For debugging purposes, I have a document.write statement and I see it on the page right above that line and it does display it on the field. However this thing does not pass the varible to the servlet. I even tried replacing the unescape(params["ABC"]) with just the variable name used in the form as ABC and that did nto work either. Please suggest any other suggestions.

    test.html:
    <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
    <script language="JavaScript">
    function setHidden() {
      document.testForm.testInput.value = "test";
      return true;
    </script>
    </head>
    <body>
    <form method="post" name="testForm" action="test2.jsp" onSubmit="return setHidden()">
    <INPUT TYPE="hidden" NAME="testInput">
    <INPUT TYPE="submit" VALUE="submit">
    </form>
    </body>
    </html>test2.jsp:
    <html>
    </head>
    <body>
    <%
    out.println(request.getParameter("testInput"));
    %>
    </body>
    </html>

  • Accordion Panels and List Menu don't work if I place html files in subfolders

    Hi all,
    Switched from Dreamweaver to Muse and I have very limited knowledge of code.
    Not an IT expert and not a web developer this is just for my own site.
    I have sub-folders in my site. All html files are inside sub-folders except index.
    ie contact.html or products.html I move them manually from root to the subfolder, using the easy interface of Dreamweaver. I call the subfolder "en"
    so I can have pages such as mysite.com/en/contact.html
    In the subfolder I copy and paste from  root the css, images and script folders,
    keeping the original css/images/scripts as well, in the root, so index.html is not affected.
    and same time the look of the html pages inside the subfolders does not change.
    BUT
    list menus and accordion panels don't work. I click and there is no movement
    How can I solve this ? I know Muse does not allow the creation of subfolders,
    everything is uploaded in the root.
    When in Dreamweaver I had placed 50 pages in subfolders and I was indexing them in google and bing.
    Now can't again put 50 pages in root and can't remove URLs and make new indexing for all these pages
    Any help ? many thanks for any assistance.

    The iPhone, like the Ipad, uses the Mobile Safari browser, so here's an earlier thread that might give you some insight: http://forums.adobe.com/thread/613494

  • Whats the difference between Info path forms and List form?

     Hello,
    Can any one please tell me when we have to use list or infopath form ?
    Thanks,

    Hi,
    Use a list if:
    You want to quickly get started building InfoPath forms on SharePoint
    You need to use your form offline with SharePoint Workspace (formerly Groove)
    You want to filter your SharePoint list based on a person or group
    You would like to use the built-in display / edit views
    Use a form library if:
    You have repeating or nested data
    You are working from a predefined industry or complex schema
    Your form needs to be digitally signed
    You need code in your form
    Your form is not hosted in SharePoint or you need to store results as an XML document
    Source http://blogs.msdn.com/b/infopath/archive/2010/04/22/comparing-list-and-form-library-forms.aspx

  • Unable to view A/R Invoice form and Main menu

    Dear Experts,
    I am using 2007 A pl 30. I did allocate the manager for the Professional User, SAP Addons, SDK Tools. When i try to open the A/R invoice form, it is not showing on screen but then it is available in the window drop down menu. Also, the main menu is not showing. The other forms are viewable.
    Thank you in advance.
    Manuel

    Click on A/R Invoice and Select Windows - Cascade to bring the screen down to normal.

  • HTML Code and Snap menu (follow-up)

    Hello,
    I posted yesterday and some people were nice enough to help me. I'm following up and hoping to get additional info.
    I'm trying to eliminate "Brain Fitness" and "Mind Max" from my snap menu (please see "Menu Items" attachment ).  I removed the code that I thought corresponded to those links - I'm posting two additional attachments.  The code I removed is highlighted in red.  It made no difference - absolutely nothing appears to have changed.
    The website address is www.mypotentia.com.  I know I am missing something, possibly something simple - if anyone wants to give me a suggestion, I will be thrilled!  Thank you very much.
    Alexis

    Your pages are template pages and this is probably why you cannot remove the code, (this is also why certain items appear grayed out).
    Find your master template page, (it will have the file extension dwt, and is probably in a folder named templates) and delete the following code there -
    <p><a href="program_brain_fitness.html"><img src="images/programs_brain_fitness.gif" alt="Click here to learn about POTENTIA's Brain Fitness program" width="140" height="26"></a></p>
      <p><a href="program_mind_max.html"><img src="images/programs_mind_max.gif" alt="Click here to learn about POTENTIA's Mind-Max program" width="140" height="26"></a></p>
    PZ

  • HTML forms and Servlets

    Hi all.
    This is the story:
    I got a SELECT field that contains OPTIONS with values and labels (both different). How I do to get this two data.
    With request.getParameter("menu1") i can get the VALUE, how i can get the Label?
    Second quiestion:
    I got a input checkbox type , this has a VALUE property, but In my servlet i just want to know if it's cheked or no.
    If i do something like request.getParameter("check1")I get the VALUE data. how to tell if it is cheked??
    Thanks in advance any help.

    First Question:
    The option value is what gets sent is when the form is submitted. If you want the information sent then you'll have to add it to the value and parse it out in the servlet.
    Second Question:
    Only checkboxes that are checked get sent when the form is submitted. If the parameter does not return null then the box was checked. If the box was not checked then the getParameter call will return null.

  • Using JSP, HTML Form for uploading image  in order to be saved into a db

    I have a HTML form and I am using <input type="file"> tag. The problem is that I don't know the Java code needed for the JSP page in order to get through the path and get the image(of course I refer to binary object). Below there is the html code
    <%@ page language="java" import="java.sql.*, java.awt.*, java.awt.Event, java.util.*, java.io.*, javax.servlet.*"%>
    <html>
    <head>
    </head>
    <body>
    <div align="left"></div>
    <form action="action.jsp" method="POST" name="form"
    <h1>Add Data</h1>
    <table>
    <tr>
    <td>Name</td>
    <td><input type="text" name="Name" value="" /></td>
    </tr>
    <tr>
    <td>Last Name</td>
    <td><input type="text" name="lastname" value=""/></td>
    </tr>
    <tr>
    <td>Studies</td>
    <td><textarea name="studies" rows="4" cols="20" >
    </textarea>
    </td>
    </tr>
    <tr>
    <td>General Data</td>
    <td><textarea name="gendata" rows="4" cols="20">
    </textarea>
    </td>
    </tr>
    <tr>
    <td>Photo</td>
    <td><input type="File" name="photo"/></td>
    </tr>
    <tr>
    <td> <input type="submit" > </td>
    </tr>
    </table>
    </form>
    If you want to view the Personnel List click here<br>
    Go to index
    </body>
    </html>

    A JSP should not be involved in this. The browser will offer a way to specify a file, and the target of the form should be a servlet that can handle multipart uploads. JSPs should not process any input.
    More info: http://www.jguru.com/faq/view.jsp?EID=160 or Google

  • Can  Java be used to save content of HTML form to a file?

    We have an application that saves a pdf file to a location on our webserver. The file displays on the users machine in a browser window. I have created a link in the links bar of the browser window which launches a simple HTML page. This page allows the user to enter a number of fields and click 'SAVE'. This is where I am having the problem. I need the save button to firstly create a csv file on the webserver containing the details input by the user. I then need the pdf file saved to the web server with a new name and in the same location as the csv file. is there anyway to achieve this using Java or can anyone please point me in the right direction?
    Thanks

    <<Click on the SAVE button in an HTML <form> and the browser will perform an HTTP POST of the data to a URL. Make that URL point to a Java servlet and it can take that form data
    <<and write it to the webserver file system in any format you wish, including csv and pdf.
    agree with duffy. You can also use JSP and call a class method to handle whatever data you specify.
    orozcom

  • HTML Forms in OHJ

    We would like to be able to link from our online documentation to our corporate website through our secure customer portal, giving users access to features like discussion lists, FAQ, and bug fixes. In order to do this, we need to have functioning HTML Forms and SSL connections. I haven't been able to get HTML forms to work. Is there a fix coming for this? What about SSL? Is that built into the ICE browser?
    Jeff Beal

    Unfortunately this is an issue with Android and it isn’t possible for us to fix it. As a workaround you can either:
    Display our credential dialog after the reader taps a button in your banner instead of trying to collect the username/password in the banner itself
    Use a full custom store and collect the information in that
    Neil

Maybe you are looking for

  • Hebrew versions of photoshop-upgrading from xp to win 7

    my GF's daughter is studying photography in high school and they all bought cs3. the UI is in hebrew. shes using xp. the computer is very slow. im upgrading my pc and want to pass my hardware to her and add an ssd and pgrade XP to win 7 pro. so some

  • JTable in JScrollPane, preferred size

    When I put a JTable in a JScrollPane, the JScrollPane seems to want to be very big. How does the scroll pane determine its size? run this code for an example.. import javax.swing.*; public class TestPanel extends JPanel public TestPanel()      add(ne

  • To run and work on AIX server installed ODI

    Hi all, As I was working on ODI till the date in window o/s of my desktop. But now I have to work on AIX server I need to know * Is there any difference to work on ODI while I am using AIX plz provide me necessary information.. * Will working methodo

  • BW-BPS quetions in "C_TBW45_70" certificaiton

    Hi- How many questions I can expect from BW-BPS (TBw45.pdf) in "C_TBW45_70" certificaion exam? I am looking for a approximate number. The syllabus (waitage) section in the webpage, includes it in one the topics in 60% section, but no specific % for B

  • How do you create a new iMovie but not erase the old one?

    I've been working on this iMovie for fun and I got an assignment to make a movie, but I don't want to delete my old movie. What do I do?