Labels

Thursday, March 29, 2007

Hide Error Label on Anchor Click.

Below Sequence fires.

  • When link is clicked it hides the label by calling 'onClick="Hide()' hides the label.
  • When the button is clicked below event happens:
    • button_clientside_click : NA
    • Page_Load: Label gets Visible due to declarative values.
    • Button_ServerSide_Click :
    • Page_PreRender
    • body_onload_clientside : NA
    • Page_Render : Label gets Visible
    • Page_Unload

Hence when the button is clicked you will see the label again. i.e Server does not consider the changes made by client.

// -----------------------------------------------
function Hide()
{
document.getElementById('Label1').style.display='none';
}
// -----------------------------------------------


Hope it is Clear now.


No comments:

Post a Comment