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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not getting alert() working.

Status
Not open for further replies.

ebarratt

Programmer
Apr 10, 2002
53
0
0
US
hey all was wondering if anyone could help me. I'm trying to get a javascript event handler into an asp.net webcontrol.

in asp.net's form_load procedure i set the webcontrol submit button to right the html event handler like so.

Form_Load event:
btn.attributes.add("onSubmit", "functioncall()")

In the html produces from the server side code the onSubmit="functioncall()" is present, however it doesn't seem to be firing when a user clicks on the button.

Any suggestions? *** Any suggestions to my asp.net site would be great if your bored!
 
I think you're in search of the 'onClick' event, rather than the onSubmit.

onSubmit will work for a form, though, provided its not being submitted with an asp:linkButton

onClick is for buttons

:)
paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top