I have a input type = button on a page with style display none, so I don't want to display it
but with FormDecorator I have a little piece of button ( the right hand) whose display.
I can't add visible=false on this button because I can't access it by javascript.
Is there a solution ?
Eric
2 Answers, 1 is accepted
0
Accepted
Martin
Telerik team
answered on 15 Jul 2009, 01:35 PM
Hi Maveric,
When a button is decorated by RadFormDecorator, it is actually wrapped in a <a /> tag in order to assure two important styling aspects:
1. Seamless :hover / :active / :focus state achieved with CSS only
2. Support for rounded corners via the so-called "sliding doors" approach
When you set a button to CSS display: none, actually the button remains hidden, however you see the wrapping <a /> tag. In order to hide the entire control you may use two approaches:
1. To put the hidden button inside a <span /> tag, and set display: none to the span, not to the button
2. To use the following CSS, applied to the wrapping <a />:
.rfdSkinnedButton
{
display: none !important;
}
3. To toggle the visibility of the button on the client with JavaScript properly you need to manipulate its parentNode, instead:
$get('Button1').parentNode.style.display = 'none'; // to set the skinned button invisible
or
$get('Button1').parentNode.style.display = 'inline-block'; // to set the skinned button visible