![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is it not possible to call a JS function from an ASP.Net button. In the HTML I assign the onClick="JS_Function()" But when page is rendered I get the error: JS_Function() is not a member of MyPage.aspx. It appears the onClick is the same as the Click event, because all the examples I saw show VB.Net, C# or JScript sever side code. I am try to use a webimage button because it give me the look I want to call a client side JavaScript. WR |
#3
| |||
| |||
|
|
WhiskeyRomeo wrote: Is it not possible to call a JS function from an ASP.Net button. In the HTML I assign the onClick="JS_Function()" But when page is rendered I get the error: JS_Function() is not a member of MyPage.aspx. It appears the onClick is the same as the Click event, because all the examples I saw show VB.Net, C# or JScript sever side code. I am try to use a webimage button because it give me the look I want to call a client side JavaScript. WR Use OnClientClick instead of OnClick (ASP.NET 2.0 or higher). -- Riki |
#4
| |||
| |||
|
|
Sorry, I forgot to mention this is 1.1 application. We are not quite ready to upgradie it to 2.0. Is there any solution for 1.1? WR |
|
"Riki" wrote: WhiskeyRomeo wrote: Is it not possible to call a JS function from an ASP.Net button. In the HTML I assign the onClick="JS_Function()" But when page is rendered I get the error: JS_Function() is not a member of MyPage.aspx. It appears the onClick is the same as the Click event, because all the examples I saw show VB.Net, C# or JScript sever side code. I am try to use a webimage button because it give me the look I want to call a client side JavaScript. WR Use OnClientClick instead of OnClick (ASP.NET 2.0 or higher). -- Riki |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |