0
目前我在同一页面中有一个Jsp页面我写了jquery Autocomplete,并且需要将该属性值传递给操作类。如何在Jquery中获取Jsp Struts属性值自动完成
的jQuery:
$("#mednameautobox").autocomplete("/ConsultationAutoCompleteAction.do?mode=getAutoCompletionList¶meter=Med Name&forvalue"+document.getElementById("FormId").value);
JSP:
<td>
<html:text styleId="mednameautobox" property="mednameautobox" value="SEARCH MEDICINE NAME" styleClass="textBox textBoxMedium" disabled="<%=viewmode%>" onblur="javascript:searchfromselectbox('Med Name');"/>
</td>
<td width="20%" class="formLabel">Form:<span class="mandatorySymbol">*</span></td>
<!-- <td class="formLabel">City: </td> -->
<td>
<html:select name="frmPatientDetails" property ="formlist" styleId="FormId" styleClass="selectBox selectBoxMedium" disabled="<%=viewmode%>" onchange="getDropDown('medicine','MedicineId')">
<html:option value="">Select from list</html:option>
<html:optionsCollection name="alformlist" label="cacheDesc" value="cacheId"/>
</html:select>
</td>
Action类:
String FormValue=request.getParameter("forvalue");
System.out.println("form value in AutoCompleteAction: "+FormValue);
但FormValue值我得到空。 建议我采取任何其他方式来实现它或纠正我,如果我错了。