Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cmdDelete.Attributes("onclick") does not work!

Status
Not open for further replies.

olivia919

Programmer
May 19, 2005
24
US
in my Page_Load

If Not Page.IsPostBack Then
cmdDelete.Attributes("onclick") = _
"return confirm('Are you sure you wish to Delete the selected USER?');"
end if

The confirm message does not show when I click Delete button. Anyone has any idea what could be the problem.
The werid thing is that it used to worked for me on several different pages. It just stopped working one day. what could be the problem? :(
Thanks for you your help.

Olivia
 
Try using
Code:
cmdDelete.Attributes.Add("onclick","return confirm('Are you sure you wish to Delete the selected USER?');")
If that doesn;t work then you seem to have a problem. Have a look in the View Source of the page and see if the onclick event actually exists for the button.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top