You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by HariniKaushik <kh...@yahoo.com> on 2009/06/22 09:09:10 UTC

To show and hide contents for struts2 div tag

Hi All,

I want to show and hide some tags based on the selection in the drop down
list.

The code in jsp

<s:form action="Register" method="post" enctype="multipart/form-data" >
 <s:select label="Occupation Type" id="Workselect"
name="background.workType" onchange="javascript:show_details();"
headerKey="1"  headerValue="--Please Select--" list="#{'S':'Pursuing
Education','W':'Working Professional'}"   />
           
 <sx:div id="box"  cssClass="Box"  >
    <s:textfield label="Organization Name" id="ON" name="background.orgName"
/>
</sx:div>
 <sx:div id="box1" cssClass="Box1">
     <s:textfield id="IN" label="Institute Name" id="Iname"
name="background.instName" />
</sx:div>
       </s:form>

How can i go with the javascript show_details() method for showing the div
'box' on selecting 'W' and 'box1' on selecting 'S'?
How can we use Dojo tags to accomplish the same?

Appreciate any help!!!

Thanks,
Harini
-- 
View this message in context: http://www.nabble.com/To-show-and-hide-contents-for-struts2-div-tag-tp24142623p24142623.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org