Question: I wonder why the `div` tag is not able to hide the Struts2 tags, I am using a `div` which should hide on load, and `onChange` I am calling jQuery which toggles the `div` tag...

```
<%@ taglib prefix="s" uri="/struts-tags" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" >
$( document ).ready(function() {
    $("#t").click(function(){
        alert("I Know Its Not Working");
        $('#tt').toggle();
    });
    });
    </script>
</head>
<body>
<s:form >
<div style="display: none;" id="tt">
<s:textfield></s:textfield>
</div>
</s:form>
<input type="button" id="t">
</body>
</html>

```

Answer: 
By default Struts2 uses `xhtml` theme for generating html content of form fields like `textfield` tag. This theme is using a `<table>` layout with `<tr><td>` for input elements. This breaks your design because these elements is placed outside `<div>` tag. If you want to use `<div>` instead of `<tr><td>` for your input fields then you can choose `css_xhtml` theme. If you want to omit to generate `<tr><td>` or `<div>` then you can use `simple` theme. For example

```jsp
<s:form theme="simple">
 <div style="display: none;" id="tt">
   <s:textfield name="myfield" />
 </div>
</s:form>

```

**References:**

* [Themes and templates](https://struts.apache.org/tag-developers/themes-and-templates)
i tested . working 100% for me :)

```
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Insert title here</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
        //jquery methods go here...

  $("#btnhidediv").change(function(){

        $("#togglediv").toggle();

    });

});
</script>

</head>
<body>
<form>
<div  id="togglediv" style="display: none;">
<s:textfield  type="text" name="xyz" key="xyz" size="11" label="xyz"></s:textfield><br />

<p>Hieeeeeeeeeee</p>

</div>
<input type="text" id="btnhidediv">
</form>
<body>
</html>

```