Get a serverside reference to the Save button

  •  02-12-2009, 1:37 PM

    Get a serverside reference to the Save button

    Hi Adam,
     
    I would like to fire a clientside javascript function when the user clicks the Save button.
    I know the documentation has examples of this but in my case this is not working. This is probably due to the way I have overriden the CE control so that users can dynamically add the CE control through webparts.
     
    Bascially I would like to get a ref to the save button then simply add an an onclick attribute.
     
    Something like...
     
    WebControl btSave = (WebControl)this._tb.Findcontrol("Save");
    btSave.Attributes.Add("onclick", "firemyfunction()");
     
    Trouble is I dont know the type of the Save button to look for?
     
    Paul.
    Filed under:
View Complete Thread