www.webdeveloper.com
Results 1 to 5 of 5

Thread: drop down

  1. #1
    Join Date
    Jan 2009
    Posts
    12

    Question drop down

    I am really stumped by this one....

    I have the same dropdown for 2 pages (a link on one page leading to the next page) and i want whatever drop down option the user chooses for the first page, once he clicks on the link to the next page, i would like for the same drop down option to be preselected.

    Thanks in advance guys!

  2. #2
    Join Date
    Jan 2009
    Posts
    3,346
    Do you have some existing code to post?

  3. #3
    Join Date
    Jan 2009
    Posts
    12
    i don't have anycode sorry!

  4. #4
    Join Date
    Jan 2009
    Posts
    3,346
    Are you using JSP or might this be a javascript question?

  5. #5
    Join Date
    Jan 2009
    Posts
    12
    i am using jsp i can show you my jsp code:

    this is the code for the 2nd page which i want the drop down to be whatever was selected on the first page

    <c:set var="editor" scope="page" value="${actionBean.editor}" />
    <c:set var="model" scope="page" value="${editor.tagHelper.model}" />
    <html>
    <body>

    <stripes:errors/>

    <stripes:form method="get" name="EUPPopupActionBean"

    id="EUPPopupActionBean" action="${actionBean.uri}">

    <div class="form">

    <h4 class="title">PC to UIC Lookup</h4>

    <div class= "content">

    <fieldset><legend>Search By</legend>

    <input name="searchByPC" id="searchByPC"

    onclick="this.form.searchByUIC.checked=false;" value="true" type="radio"

    <c:if test="${action.searchByPC}">checked</c:if> /> <label

    for="searchByPC">Proponent Code</label>

    <input name="searchByUIC" id="searchByUIC"

    onclick="this.form.searchByPC.checked=false;" value="true" type="radio" <c:if

    test="${action.searchByUIC}">checked</c:if> /><label

    for="searchByUic">UIC</label>
    </fieldset>
    <br/>
    <br/>
    <label for="PC">Proponent Code:</label>

    <stripes:select name="proponentCodeId" value="${model.proponentCode.id}"

    style="width:300px">

    <stripesptions-collection

    collection="${model.proponentCodes}"label="longDescription" value="id" />

    </stripes:select>
    <br>
    <br>
    <label for="UIC" UIC:</label>
    <input type="text" value="${actionBean.uic}" name="uic" id="uic" size="10" maxLength="6" />
    <br>
    <br>
    <stripes:submit name="search" value="Search" onclick="return searchTable(this.form, 'searchArea');" />
    <input align="right" type="submit" name="close" value="Close" onclick="javascript: window.close()" />

    </div>
    </div>
    </stripes:form>
    </div>

    <c:set var="bodyClass" value="" />
    <c:set var="containerClass" value="" />
    <c:set var="divClass" value="" />

    <c:choose>
    <c:when test="${ model.rowCount > 11}">
    <c:set var="bodyClass" value="scrollContent" />
    <c:set var="containerClass" value="scrollableTableContainer" /><%-- make a scrollable table --%>
    </c:when>

    </c:choose>

    <div id="results">
    <h3>Search Results </h3>
    <span id="match-count-message">
    Total Matches Found:
    <span id="match-count">
    ${model.rowCount}
    </span>
    </span>

    <dla:ICISTable tableHelper="${editor.tagHelper}" border="0" width="95%"
    step="50">
    <jsp:include page="/table/defaultTable.jsp" />

    </dla:ICISTable>
    </div>
    </body>
    </html>

    this is the code for the first page:

    <c:set var="editor" scope="page" value="${actionBean.editor}" />
    <c:set var="model" scope="page" value="${editor.tagHelper.model}" />
    <table border="0" width="95%">
    <tr>
    <td colspan="100%"><b>File Name: ${actionBean.tableName}</b></td>
    </tr>
    <tr>
    <td align="center" valign="bottom"><b>Proponent Code</b><br />

    <stripes:select name="proponentCodeId" onchange="submit()"
    value="${model.proponentCode.id}" style="width:300px">

    <stripesptions-collection collection="${model.proponentCodes}"
    label="longDescription" value="id" />
    </stripes:select>
    <a href="${pageContext.request.contextPath}/flowModel.action"
    target="_blank"><font color="#0066CC"><b>PC to UIC Look-up</b></font> </a></td>

    <td align="center" valign="bottom"><b>Combat Operations /CombatPhase</b><br />

    <stripes:select name="armyStanceId" onchange="submit()"
    value="${model.armyStance.id}">
    <stripesptions-collection collection="${model.armyStances}"
    label="displayValue" value="id" />
    </stripes:select></td>
    </tr>
    <tr>
    <td align="right" valign="bottom" colspan="100%"><font size="1"
    color="8B2323"><b>Read-only</b></font></td>
    </tr>
    </table>
    <dla:ICISTable tableHelper="${editor.tagHelper}" border="0" width="95%"
    step="${editor.tagHelper.step}">
    <jsp:include page="/table/defaultTable.jsp" />
    <jsp:include page="/table/tableNavigation.jsp" />
    </dla:ICISTable>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles