By virtue of having RadFormDecorator on the master page, the page markup changes during rendering. A button gets wrapped into <a>:
Hiding the button in this scenario has undesired side affect. Since it is wrapped in the <a>, <a> will still render and because it has internal style padding, there will be a rectangle left on the screen. Therefore I need to find this <a> and hide it instead of my button.
At first it didn't sound a big deal, I can get the button parent:
However the decoration occurs late in the page life cycle, after document.ready() and the code above returns wrong element. It never finds <a>.
I tried replacing document.ready() with window.load(). Sometimes if works, but it is very unstable. I don't see a way of excluding just that button from decorating, I don't want global changes. $find also didn't seem to work.
So how can I find this element?
-Stan
<
A
class
=
rfdSkinnedButton
href
=
"javascript:void(0)"
>
<
INPUT
... />
</
A
>
Hiding the button in this scenario has undesired side affect. Since it is wrapped in the <a>, <a> will still render and because it has internal style padding, there will be a rectangle left on the screen. Therefore I need to find this <a> and hide it instead of my button.
At first it didn't sound a big deal, I can get the button parent:
var
aTag = $(
"[id$='_btnConfirm']"
).parent();
However the decoration occurs late in the page life cycle, after document.ready() and the code above returns wrong element. It never finds <a>.
I tried replacing document.ready() with window.load(). Sometimes if works, but it is very unstable. I don't see a way of excluding just that button from decorating, I don't want global changes. $find also didn't seem to work.
So how can I find this element?
-Stan