We help IT Professionals succeed at work.

Error in JSP and Javascript

Web_Admin used Ask the Experts™
Hello experts,

I have this jsp code that doesn't print <%=%> param in javascript value see below code:

and the output in the html source is :

                                     <td align="left" >Category : </td>
                                     <td align="left">


<select name="param1<%=baserowid%>" id="param1<%=baserowid%>" size="1"  onchange="javascript:getActivity('<%=baseRowID%>')">

      <option selected value="">(Please Select)</option>

      <option  value="C111">YasserCategory</option>

      <option  value="C000">CATEGORY</option>

      <option  value="C001">Foreign Vendors</option>

      <option  value="C002">Control Systems</option>

      <option  value="C003">Computers & Accessories</option>

      <option  value="C004">Electronics</option>

      <option  value="C005">Garments & shoes & other accessories </option>

      <option  value="C006">Furniture's & home Appliances</option>

      <option  value="C007">Agriculture Materials & Equipments</option>

      <option  value="C008">Lab Equipments & Supplies</option>

      <option  value="C009">Maintenance Materials</option>

      <option  value="C010">Animals & Animal Feeds</option>

      <option  value="C011">Heavy Equipments</option>

      <option  value="C012">Stationary, books & Gifts</option>

      <option  value="C013">Cars, Trucks & Spare Parts & Consumables</option>

      <option  value="C014">Handy Craft</option>

      <option  value="C015">Maintenance</option>

      <option  value="C016">Services</option>

      <option  value="C017">Works</option>


<script>showSelectedOption("param1<%=baserowid%>", "")</script>

						 <td align="left" >Category : </td>
						 <td align="left">
						 <jsp:include page="includes/list/list_activity_category.jsp" flush="true">
								  <jsp:param name="listName" value="param1<%=baseRowID%>"/>
								  <jsp:param name="listSelectedOption" value=""/>
								  <jsp:param name="listNullOption" value="(Please Select)"/>
								  <jsp:param name="listChangeAction" value="javascript:getActivity(<%=baseRowID%>)"/>
						  <div id="errorParam1IsEmpty<%=baseRowID%>" class="hidden_div">Required</div>

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
as per your html source, it seems JSP is not executed/rendered. are you sure JSP is configured and it is working fine...

change to javascript:getActivity('<%=baseRowID%>')

single qout missing