Click to See Complete Forum and Search --> : drop down
teenqueen
07-28-2009, 10:31 AM
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!
criterion9
07-28-2009, 10:50 AM
Do you have some existing code to post?
teenqueen
07-28-2009, 11:36 AM
i don't have anycode sorry!
criterion9
07-28-2009, 12:11 PM
Are you using JSP or might this be a javascript question?
teenqueen
07-28-2009, 01:29 PM
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">
<stripes:options-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">
<stripes:options-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}">
<stripes:options-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>