my module.js file
----------------
Code:
<script type="text/javascript>
function doDscptAction(field, span){
var dscptVal= field.value;
var obj = span;
for(i=0;i<obj.length;i++){
if (dscptVal == '001'){
document.getElementById("enq").style.display="inline";
document.getElementById("nam").style.display="inline";
document.getElementById("cpActno").style.display="none";
document.getElementById("trandt").style.display="none";
}
</script>
my html code:
--------------
Code:
<html:html>
<head>
<script language="javascript" src="../../js/module.js"></script>
<head>
<body>
<tr>
<td width="13%" class="labeltext">Transaction Code</td>
<td width="1%" class="blanktext">:</td>
<td colspan="4" class="blanktext">
<html:select property="dscpt" styleClass="dropdown" value="${X00.dscpt}" onchange="doDscptAction(this,spanid)">// iam trying to pass this,spanid here
<html:option value="001">001 - Agent1 </html:option>
<html:option value="002">003 - Nostro </html:option>
</html:select>
</td>
</tr>
</table>
<span id="trans" style="display:none">
<table width="100%">
<tr>
<td width="13%" class="labeltext">Transaction Type</td>
<html:select property="transtype" styleClass="dropdown" value="${X00.transtype}"onclick="forex(this)">
<html:option value=""></html:option>
<html:option value="02">02 - SENEX</html:option>
<html:option value="04">04 - ONLINE</html:option>
</html:select>
</td>
</tr>
</table>
</span>
</body>
</html:html>
Bookmarks