<s:iterator id="part" value="parts" status="st">
   <s:property value="pid"/><br>
   <s:property value="detail"/><br>
</s:iterator>
 
works fine, but I need to use s:div inside the s:iterator, the nightmare happen
 
first of all, after I did research, in order to let DIV works inside 
s:iterator, have to use S:DIV
 
second,  I try to use <s:property value='pid'/> inside S:DIV, value not 
trieved, and display:none not work at all
 
<script language="javascript">
function toggle(input) {
        var ele = document.getElementById(input);        
        if(ele.style.display == "block") 
                ele.style.display = "none";
         else 
                ele.style.display = "block";
         }
</script>

<s:iterator id="part" value="parts" status="st">

   <s:property value="pid"/><br>
 
   <a id="<s:property value='pid'/>" href=javascript:toggle("<s:property 
value='pid'/>")>SHOW</a>
 
   <s:div id="<s:property value='pid''/>" style="display:none">
             <s:property value="detail"/><br>
   </s:div>   
 
</s:iterator>
 
the purpose for using s:div inside s:iterator is hide/show "detail"
 
 
please help
 
thanks in advance
 
john

Reply via email to