0

Hi All,
I hope my problem 'll get solved by posting my query here.
Actually I have div tag with this style.

<style type="text/css">
          .Box {
         display:none;
         }
         .Box1 {
 display:none;
         }
</style>

If i give the div tags directly in the jsp its working fine,,
like this

<s:select label="Occupation Type" id="Workselect" name="background.workType" headerKey="1"  headerValue="--Please Select--" list="#{'S':'Pursuing Education','W':'Working Professional'}" />
         <div  class="Box">
             <s:textfield label="Organization Name" id="ON" name="background.orgName" />
            </div>
            <div  class="Box1">
             <s:textfield id="IN" label="Institute Name" id="Iname" name="background.instName" />
            </div>

but if i wrap it with the form tag its not working.

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

I donot know how to apply css for divs inside the form tag.
I want to hide the contents of div tag when placed inside the form.
How can i do that?
Appreciate any help

Thanks

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by MidiMagic
0
<style type="text/css">
  .Box { display:none;  }
  .Box1 { display:none; }
</style>
<s:form action="Register" method="POST"  enctype="multipart/form-data">
 <s:select label="Occupation Type" id="Workselect" name="background.workType" headerKey="1"  headerValue="--Please Select--" list="#{'S':'Pursuing Education','W':'Working Professional'}" />
 <s:textfield   class="Box" label="Organization Name" id="ON" name="background.orgName" />
 <s:textfield   class="Box1" id="IN" label="Institute Name" id="Iname" name="background.instName" />
 </s:form>

?? the code supplied is not html, check elsewhere than your inline code for other styles defining
<s:
elements,
try the sample code

0

If a script is changing the s tags into other tags, the styles will not apply. The styles are applied at the time the page originally renders.

The s tags cause a failure to render anything inside them, because html does not have an s tag. They also throw the browser into quirks mode.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.