Display search results on the same page

I have a text box with a submit button to the left. Once the user enter the a number in the search field my select query executes.
My question is how can i display the reult on the same page? I have been able to display results on the same page but my table headers are also displayed at the same time while user is trying to enter the item number.
i tried using <c:if> but its not wokring, Any help?
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<html>
<head>
<title>VDP QOH UPDATE</title>
</head>
<body>
<spring:bind path="quantityOnHand">
  <FONT color="red">
    <B><c:out value="${status.errorMessage}"/></B>
  </FONT>
</spring:bind>
<P>
<FORM name="quantityOnHandForm" method="POST" action = ''>
<CENTER>
<table BORDER=0  CELLSPACING=0 CELLPADDING=5 WIDTH=600>
    <tr>
          <td COLSPAN=2 BGCOLOR="#003366"><P ALIGN=CENTER><B><FONT COLOR="#FFFFFF" SIZE="2" FACE="Arial,Helvetica,Univers,Zurich BT">Query</FONT></B>
          </td>
     </tr>
     <tr>
          <td WIDTH=215 BGCOLOR="#336699"><P ALIGN=RIGHT>
              <B>
                 <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">
                    Item No:
                  </FONT>
               </B>
          </td>
          <td ALIGN=LEFT><spring:bind path="quantityOnHand.itemNumber">
                  <input type="text" maxlength="30" size="10" name='<c:out value="${status.expression}"/>' value='<c:out value="${status.
                         value}"/>'>
    <td><font color="red"><c:out value="${status.errorMessage}" /></font>    </td>
       </spring:bind>
          </td>
     </tr>
    <tr>
        <td BGCOLOR="#336699" WIDTH=215> </td>
        <td>
            <input type="submit" name="Submit" value="Submit" >
       </td>
   </tr>
</table>
</center>
</form>This is basically all of my search jsp code. Now i've added my other code after </form> to display the results.
</form>
<table BORDER=0  CELLSPACING=0 CELLPADDING=5 WIDTH=600>
    <tr>
          <td COLSPAN=2 BGCOLOR="#003366"><P ALIGN=CENTER><B><FONT COLOR="#FFFFFF" SIZE="2" FACE="Arial,Helvetica,Univers,Zurich BT">Quantity On Hand Search Results</FONT></B>
          </td>
     </tr>
     </table>              
<c:choose>
<c:when test="${empty qohInfo}">
         <div align="left" style="color:#336699;"><b>No records Found.<br><br></b></div>
</c:when>
<c:otherwise>
     <table width="602" height="92">
          <tr>   
               <th ALIGN=CENTER BGCOLOR="#336699" width="110" >
                   <B>
                      <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Item Number</FONT>
                   </B>
               </th>
               <th ALIGN=CENTER BGCOLOR="#336699" width="115">
                   <B>
                      <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Vendor Id </FONT>
                   </B>
               </th>
               <th ALIGN=CENTER BGCOLOR="#336699" width="120">
                   <B>
                      <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT"> Inventory Date</FONT>
                   </B>
               </th>
               <th ALIGN=CENTER BGCOLOR="#336699" width="130" >
                   <B>
                      <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Update Date Time </FONT>
                   </B>
               </th>
               <th ALIGN=CENTER BGCOLOR="#336699" width="100" >
                   <B>
                      <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Quantity</FONT>
                   </B>
               </th>
          </tr>
          <c:forEach var="qohInfo" items="${qohInfo}" varStatus="loop">
    <tr BGCOLOR="#99CCFF">
      <TD align="center"><c:out value="${qohInfo.itemNumber}"/></TD>
      <TD align="center"><c:out value="${qohInfo.vendorId}"/></TD>
      <TD align="center"><c:out value="${qohInfo.inventoryDate}"/></TD>
      <TD align="center"><c:out value="${qohInfo.updateDateTime}"/></TD>
      <TD align="center"><c:out value="${qohInfo.quantity}"/></TD>
    </TR>
  </c:forEach>
  </table>
  </c:otherwise>
  </c:choose>As you can see that the table headers are always shown but i would like to hide the table headers and everything until and unles user clicks on submit button. Any help is appreciated.

Thanks balusc for your reply. I was curious how would you have used the c:if statement to display the table and hide the table if a user have not clicked the button.
I wanted to stay away from javasscript

Similar Messages

  • Displaying database results on the same page

    I am relatively new to dynamic pages and have only just
    recently created a PHP SQL setup using Dreamweaver CS3. I have no
    issues in displaying items from a recordset on a page. I have even
    used the "Master detail page set" function in CS3 to have a small
    selection of records from my recordset on the page as reference
    points to then open up a detail web page showing all the records
    for that item. But this is not what I want to do.
    I have used CSS to created a two columm page, which I have
    then saved as a template (left sidebar and then main content on the
    right). The scenario is that the database has membership details. I
    want to be able to have the membership numbers displayed in the
    left sidebar, with the main content of the database record for that
    member displayed in the main section of the page. If I click on a
    different membership number in the left column I want the main
    content to change and display the records for that member.
    I guess what I am trying to say is I want the "Master detail
    page set" functionality but rather than opening a seperate web page
    for the detail, I want it displayed on the same page.
    As I said, I am new to dynamic pages. A way I thought of it
    being done was to use frames but I don't really want to do that as
    it means making up a whole new set of templates. Is there a simple
    way of doing this?
    Thanks in advance
    JJ

    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    http://java.sun.com/docs/books/tutorial/javabeans/index.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPBeans.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/
    http://java.sun.com/developer/onlineTraining/index.html
    http://java.sun.com/docs/books/tutorial/index.html
    http://developers.sun.com/events/techdays/codecamps/index.html

  • In a Google search, clicking on a search result causes the new page to open with the search terms highlighted in yellow -- how can I turn off th

    In a Google search within a Firefox session, clicking on a search result causes the new page to open with the search terms highlighted in yellow -- how can I turn off this highlighting?

    Try to clear the Google cookies and redo those Google options.
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"

  • How to open a link from search engine in the same page

    I just noticed that my links are opening in new windows instead of on the same page on Safari. Is there anyway I can change it back to where if I click on a link in the Yahoo search engine that it would just open within the same page without opening a new tab or window, where I can go back and forth between pages? For example, say I type in "wikipedia" on Yahoo home page and click search. Then it takes me to the Yahoo! Search Results page with a link to the Wikipedia website. When I click on that link, the Wikipedia home page loads right within the same page instead of opening a new tab or window and loading into that new tab or window. If I wanted to go back to the search results, I can just click the back button. I remember Safari doing that before, is there anyway to get back to that? Thanks.

    You can set the Integer pref <b>browser.link.open_newwindow.override.external</b> to "<i>1</i>" on the <b>about:config</b> page.
    *http://kb.mozillazine.org/about:config
    The browser.link.open_newwindow.override.external pref uses the same values as this pref for JavaScript window.open() calls.
    *http://kb.mozillazine.org/browser.link.open_newwindow.restriction

  • Display regions dynamically on the same page

    Hi
    I have 2 regions.Top is an interactive editable report.Bottom region is a read only report of the same(top region)
    But when i click search button(based on paramters 1&2, i am not able to see the same number of rows.
    Top region shows 5..But bottom region shows not the same.
    Is there any custom process i need to add ?
    Please advice
    thank
    kp

    >
    http://localhost
    ----------^^^^^^^^^
    uhhh....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "namtax" <[email protected]> wrote in
    message
    news:ej54sr$m7q$[email protected]..
    > im trying to code my tree menu so that when you click on
    the album name
    > the
    > song names would display dynamically on the same page..
    >
    > Heres my page at the moment
    >
    >
    http://localhost/music_explained/forta_explained/blah_7.cfm
    >
    > I have added a href field to the album section of the
    cftree, so that when
    > you
    > click on that a question mark appears after the URL.
    > I have set up a query that selects song names dependant
    to the record
    > which is
    > clicked on the cftree...but i am having
    difficulties...anyone know of a
    > tutorial or anything on this particular topic.
    >
    > Cheers
    >

  • Display an iview in the same page.

    Hi Experts,
    I need to integrate webdynpro application which is a tree application
    when i integrate that application  if i click on that some search button it should navigate to other iview but the present application should be in the same page and the new application should be opened... how can we make it....
    plz help me in this ,.........
    waiting for u r responses...
    Regards,
    Shilpa

    Shilpa,
    If it is the 1st one (pop Up) then you can use Koti's threads.
    also check this library files to do this, if it is a external window I think this suits your requirement very well
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fd/024640c0e56913e10000000a1550b0/content.htm
    Open view in external window..
    Open views in non-modal external windows - the patch version
    PraDeep
    Edited by: pradeep bondla on Jul 18, 2008 7:14 AM

  • Displaying error messages on the same page

    Hi All !
    I'm developing a web application using JSP.I want to know how to validate any entry in a Textbox.I want to prompt the error on the same page where that corresponding textbox is. I'm a newcomer to the world of JSP and wouldn't understand a esoteric Servlet/errorpage language,so I request you all to explain your answer.
    Also,I'm writing that JSP-Oracle database connection string(all that conn,stmt,try,finally etc.) on every JSP page and this amounts to a very big code.Can somebody enlighten me on optimising this.For instance,a class or program which can be called everytime I wanna make a connection to database.One more problem is that I wouldn't know where to write a class or that program and how to call it.So ,I'm sorry,but if you are replying you have to help me out with this problem also.
    Too much to ask,I guess!!
    Will highly appreciate a reply.

    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    http://java.sun.com/docs/books/tutorial/javabeans/index.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPBeans.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://java.sun.com/j2ee/tutorial/1_3-fcs/
    http://java.sun.com/developer/onlineTraining/index.html
    http://java.sun.com/docs/books/tutorial/index.html
    http://developers.sun.com/events/techdays/codecamps/index.html

  • Search Results in the Same Window..as we have in SDN

    Hello Gurus,
    I want the search results to be displayed exactly like we have in SDN. I mean search result should be displayed in the same window rather than opening a new window. Also when click on a document that document should open in the same window.
    Please help in this.
    V

    Hello, we want to implement this functionality as well.
    We are on Portal 6.0 SP15.
    I’ve already modified the ToolAreaIview.jsp to right align the search input box and redeployed the portal archive as a new portal archive to our system.  I’ve created a new iview off this portal archive and the search box is right aligned.    Works great.
    Now we want the search results to appear in the content area iframe? in the same manner as the search results at SDN.  I followed the instructions as kindly outlined by Vaibhav.  I removed the old var searchURL= and window.open code.   My Toolareaivew.jsp now contains this in the function openSearch():
    var searchURL= "http://"location.hostname":50000""<%=url%>" QueryString;
    EPCM.raiseEvent('urn:com.ourcompany','searchResult', searchURL );
    I redeployed the par file to the portal and created a new search iview based on this code.
    I can see the javascript modifications in my browser when I go to view -> source.
    I can event take the variable  searchURL that’s displayed in the  source and paste it into my browser and the URL seems to be correct.  I then modified the com.sap.portal.navigation.contentarea.par ->  workarea.jsp and put in this code:
    // Search Result set
    function handle_searchResult_Event( eventObj ) {
    self.location.href = eventObj.dataObject;
    EPCM.subscribeEvent('urn:com.ourcompany','searchResult', handle_searchResult_Event);
    I saved the par file with the same sap name com.sap.portal.navigation.contentarea.par and redeployed it to the portal.  Now when I search on this newly created iview, it appears this event is not being raised as nothing happens.   I have further read that I may want to rename the .jsp from workarea.jsp to something else.  So I saved workarea.jsp as workarea_new.jsp and redeployed the par file.   Still nothing happens during the search.   I  have even stopped /restarted the portal but still no luck. 
    Could anyone provide any hints at what I might be doing wrong?
    Thanks in advance.

  • Why does using Google in the search bar (and only Google) not let me open search results in the same tab?

    Hello,
    When I use Google in the search bar, I have to open the search results in a new tab. If I simply click on them to open in the current tab, I'm inevitably redirected right back to the main Google site. This has only started happening in the past month or two -- I'm considering switching to Chrome after 5 years with Firefox because of this. Please help! It's incredibly frustrating to consistently have to remind myself to open all search results in a new tab. It's quite a waste of time over the course of a day.
    Here are the basic steps:
    1) I do a search using Google in the search bar.
    2) As is supposed to happen, the search returns results in the current tab.
    3) When I click on a result link, I'm immediately sent back to www.google.com.
    4) If I hit back to try to return to the search results, I'm taken to the page that was loaded BEFORE I even did the search.
    5) If, and only if, I instead right-click or Mouse3 click on the search results and open them in a new tab, I can successfully go to the search result pages.
    --Thank you

    Try to clear the Google cookies.
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"

  • Pdf files in search results - open the properties paga instead the file

    Hi,
    We have 2010 search results page for searching files. When the search result is a pdf - the icon shown is not pdf icon and when click the file name it opens the properties page instead the file itself. What should be set? thanks a lot
    keren tsur

    It looks like you didn't register PDF file type in your search service application.
    Go to Central Administration->Manage Service Application. Click on the name of your search service application and check file types (link in the left column)

  • How to encode multiple camera views and display them separately on the same page

    Does any one know if this is possible with just one
    encoder/streaming server or would you need multiple encoders to
    send separate views?

    Hello after a long time.
    I have 2 the same capture card. And I am trying to stream to 2 diffrent rtmp server. I start first one and no problem. But when I run second FME instance and select second stream card, first one turns to black and second one shows up. When I close second, first one again comes back.
    What shoul I do for streaming multiple streams form multiple stream cards?
    Best regards.

  • Displaying 2 Reports in the same Page (2nd Report depends on 1st Report)

    I have following report...
    Report is having a parameter called
    Show_2nd_Report:- Y/N (Yes/No) -
    This will display the 2nd Report depending on the value Y/N
    Case1:- Show_2nd_Report = 'N'
    query1:-
    select month, empno, work_type, hrs from table1 where code = 'X'
    (Main Report)
    month | empno | work_type | hrs (BREAK on month and empno)
    JAN'08 - 1212 - AB - 5
    JAN'08 - 1212 - BC - 4
    JAN'08 - 1212 - CD - 6
    total - 15
    JAN'08 - 3333 - AB - 1
    JAN'08 - 3333 - BC - 4
    JAN'08 - 3333 - CD - 8
    total - 13
    FEB'08 - 1212 - AB - 4
    FEB'08 - 1212 - BC - 6
    FEB'08 - 1212 - CD - 2
    total - 12
    FEB'08 - 3333 - AB - 2
    FEB'08 - 3333 - BC - 2
    FEB'08 - 3333 - CD - 5
    total - 9
    Case2:- Show_2nd_Report = 'Y' (I need help on this Part)
    Here I want to display the 2nd report just below the main report
    (after break of month and empno) as shown below.
    query1:-
    select month, empno, work_type, hrs from table1 where code = 'X'
    (Main Report)
    query2:- (2nd Report) - this is based on month and empno value ..
    select month, empno, work_type, hrs from table1
    where code = ' ' (code is blank)
    and month = p_month (exp - JAN'08)
    and empno = p_empno (exp - 1212)
    - the value of month and empno will change after each break
    month | empno | work_type | hrs (BREAK on month and empno)
    main report
    JAN'08 - 1212 - AB - 5
    JAN'08 - 1212 - BC - 4
    JAN'08 - 1212 - CD - 6
    total 15
    2nd report
    JAN'08 - 1212 - XX - 2
    JAN'08 - 1212 - XY - 1
    total 3
    main report
    JAN'08 - 3333 - AB - 1
    JAN'08 - 3333 - BC - 4
    JAN'08 - 3333 - CD - 8
    total 13
    2nd report
    JAN'08 - 3333 - XX - 1
    JAN'08 - 3333 - XY - 1
    total 2
    main report
    FEB'08 - 1212 - AB - 4
    FEB'08 - 1212 - BC - 6
    FEB'08 - 1212 - CD - 2
    total 12
    2nd report
    main report
    FEB'08 - 3333 - AB - 2
    FEB'08 - 3333 - BC - 2
    FEB'08 - 3333 - CD - 5
    total 9
    2nd report
    I need help on the 2nd Report. How can I display both the Reports in 2nd Case.
    Appreciate any help on this.
    Thanks,
    deepak
    Edited by: Deepak_J on Sep 11, 2008 11:56 AM
    Edited by: Deepak_J on Sep 11, 2008 12:02 PM

    Hi Deepak,
    You could try something like:
    SELECT DEPTNO, 1 REPORTID, SAL, EMPNO, ENAME
    FROM EMP WHERE SAL < 1000
    UNION ALL
    SELECT DEPTNO, 2 REPORTID, SAL, EMPNO, ENAME
    FROM EMP WHERE SAL >= 1000
    AND :P1_SHOW_REPORT2 = 'Y'You would then need to break by First and Second Columns. You may also have to hide the REPORTID value on the page (you must still leave the Show option ticked) - set the heading to &amp;nbsp; and use the following as the HTML Expression for the column:
    &lt;span style="display:none"&gt;#REPORTID#&lt;/span&gt;Using this, I got: http://htmldb.oracle.com/pls/otn/f?p=33642:120
    Obviously, more needs to be done with styling, but it's a start!
    Andy

  • How do I display search results in a new window?

    Our current search feature (http://mainedreamvacation.businesscatalyst.com/business-search) displays the search results in the same page. When someone clicks to see the details page, the goes "back" the browser displays an alert asking the user if they want to re-submit the form.
    Is there a way for the search results to display in a new window? My hope is that by loading results into a new window, a user could click to see the detail, then return without the alert message.
    I'm open to simply suppressing the alert message, but I don't think that's possible.
    I should point out that this is NOT a site search. Also, I have tried  {module_webappsresults,,_blank} without success.
    Thanks!

    Hi Tim,
    The approach would be similar to customizing this for normal site search. 
    You'll need to locate the page where you inserted the web app search access the html and locate the pageID in the form action.  Use the same method found in the site search to apply the specific page.
    - http://helpx.adobe.com/business-catalyst/partner/add-search-form.html> Point to the results page
    **Ensure you please the {module_webappsresults} on the custom page to have the content display as well. 
    Kind regards,
    -Sidney

  • Button results as a same page

    Hi all,
    I am using html db 1.6.
    I am created one form is called Search, and placed on two buttons A and B.
    What i want is, now i am click on the button A( using query1), the results display on the bottom.
    I click the button B(Using query2) , display a results in a same page.
    Hide the A button result. Only show the B button result.
    How to do this one.
    Any example codes?
    Thanks!

    Here's a way I do it.
    In the HTML header, put in a script section that defines the JavaScript. (I borrowed this from another thread a LONG time ago):
    <script language="JavaScript" type="text/javascript">
      function callEmpPopup (formItem1) {
        var formVal1 = document.getElementById(formItem1).value;
        var url;
      url = 'f?p=&APP_ID.:1055:&APP_SESSION.::::P1055_OFFICE_ID:' + formVal1;
      w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
      if (w.opener == null)
      w.opener = self;
      w.focus();
    </script>Next, in the report definition, go to the Link section and set the target to be URL, and use the following
    javascript:callEmpPopup('P0_ORG_ID')You'll need to actually create the page to be used for the popup. Notice that I am passing in the Page Item whose value I need to work with on the popup page, and that the new item also must exist. Also keep in mind that you'll only be able to have one of these popup windows open at a time. There might be a way to get around this, but I haven't really wanted my users opening up every popup reference...
    This could potentially answer both your questions.

  • Passing parameters between portlets with in the same page

    Hello,
    I have created a Form and a report. The form allows a user to make some selection values, and then upon submit it passes the selected values to the report to query the database. The results from the query are displayed in a new - seperate - window from the form. Is there anyway to disaply the report results on the same page as the form that called the report? I guess I am trying to have a page with 2 portlets (a form, and a report). I want the user to be able to make a selection from the form portlet and pass that selection to the report portlet within the same page.
    Thanks,
    McKell

    Hi I received this info from an OSS named Mahantesh. I thought it was very helpful information for passing portlet parameters between a form and a report within the same page.
    Please check these steps to pass parameter from form to report:
    This article is based on demo tables EMP and DEPT.
    1. Create a report RPT_DEPT using the query 'Select * from dept where deptno= :deptno'
    2. Create a form FRM_EMP based on EMP table.
    3. Edit the form FRM_EMP => 'Formatting and Validation Options' section => click on DEPTNO field
    => Give the value for the 'Link' (under 'Display options') as 'javascript:runrep()' where runrep is the name<br>
    of javascript function that we are going to create later.
    4. In 'Form text' section, in the 'Footer Text' add the code for the runrep function as follows.
    <script>
    function runrep()
    var formObj = document.forms[0];
    var deptno;
    for (var i=0; i < formObj.length ; i++){
    if (formObj.elements.name == 'FORM_EMP.DEFAULT.DEPTNO.01'){
    //FORM_EMP is the form name
    deptno = formObj.elements[i].value;
    break;
    var url="/portal/page?_pageid=38,1,38_31678:38_31787&_dad=portal&_schema=<br>
    PORTAL&deptno=" + deptno;
    //modify the url according to your environment.<br>
    window.location=url;
    }<br>
    </script>
    5. Modify the URL in the above code with your page url on which form and report portlets have been placed.
    6. Goto Page properties => Parameters tab (Parameters and Events option should have been enabled at Pagegroup level).
    7. Create a page parameter and map it with report portlet parameter.
    8. Now run the page, enter deptno or query the form to get the deptno and click on the link next to deptno field. You should get report with corresponding deptno on the page.

Maybe you are looking for