OK seeing how I can not wrap <s:textfiled> tags in a <div>, how would I go
about using the default theme to remove the whole <tr> that has the label
and field?
I'm out of my knowledge area with this one.
newton.dave wrote:
>
> --- Justin Frost <[EMAIL PROTECTED]> wrote:
>> I want to be able to hide an entire <s:div> tag based on an onclick event
>> from a <s:checkbox>
>>
>> I was not able to hide the div.
>
>> And when I tried to hide just a <s:textbox> field only the html text box
>> was hidden, not the label.
>
> That's because the ID is for the textbox (which makes sense). It might
> make
> sense to generate an ID for the <tr...> containing the label and input
> element, though--added to my list.
>
>> document.LocationAddNode.elements("prodIpPort").style.display =
>> 'none';
>> //Does not work
>
> This syntax doesn't work in FF (at least on my Mac). Do you get JavaScript
> errors? What browser? How are you debugging?
>
> Why wouldn't you just use document.getElementByd("prodIpPort")? (Or use a
> JavaScript library that makes things even easier?)
>
>> <s:form action="LocationAddNode" validate="false"
>> id="LocationAddNode"
>> name="LocationAddNode">
>> <s:div id="prodIpPort" name="prodOpenLinkUri">
>> <s:textfield name="prodSendUri.ip"
>> label="OpenLink IP" id="prodIp" />
>> <s:textfield name="prodSendUri.port"
>> label="Port" id="prodPort"
>> maxlength="10"/>
>> </s:div>
>> </s:form>
>
> I'm not sure if that will generate valid HTML; can you wrap <tr...>
> elements
> in a <div...>? You'd probably need to hide each row rather than wrapping
> them
> in a <div...>, but I'm never sure what's legal HTML anymore.
>
> I'm also not sure if I'd bother using <s:div...> if you're just using it
> to
> create a normal <div...> element; seems like unnecessary overhead.
>
> d.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/-S2-Using-javascript-to-hide-a-struts-tag-tp14456476p14458822.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]