473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

onclick

With html buttons, I can say onclick="MyFunction();" and
it calls a JavaScript function called "MyFunction", but
with the Web Controls buttons, OnClick="MyFunction();"
produces an error:

Compiler Error Message: BC30456: 'MyFunction' is not a
member of 'ASP.wfNI206AE_aspx'. I'm trying to research wh
these controls can't find the javascript function. Both
the control and the javascript function are contained
within the same set of <form></form> tags.

Anyone know anything about this?

Jul 19 '05 #1
2 3247
did you write a JavaScript function MyFunction()?

-----Original Message-----
With html buttons, I can say onclick="MyFunction();" and
it calls a JavaScript function called "MyFunction", but
with the Web Controls buttons, OnClick="MyFunction();"
produces an error:

Compiler Error Message: BC30456: 'MyFunction' is not a
member of 'ASP.wfNI206AE_aspx'. I'm trying to research whthese controls can't find the javascript function. Both
the control and the javascript function are contained
within the same set of <form></form> tags.

Anyone know anything about this?

.

Jul 19 '05 #2
Not sure if this explanation is accurate, but this is how
i understand it...

With the html buttons, the OnClick works with the
javascript because the OnClick handles the click on the
client-side...if you look at the event handler for a html
button in your code-behind, you'll notice that the event
handled is actually ServerClick - the click is handled
server-side.

If you want to use a javascrupt function with the OnClick
for a web server button, you can either set it as a
property of the button in the aspx page like this:

OnClick="javascript:MyFunction();"

Or you can add the javascript function to the web server
button's OnClick event in the code-behind like this
(working in vb):

btnName.Attributes.Add("onClick", "MyFunction();")

-----Original Message-----
With html buttons, I can say onclick="MyFunction();" and
it calls a JavaScript function called "MyFunction", but
with the Web Controls buttons, OnClick="MyFunction();"
produces an error:

Compiler Error Message: BC30456: 'MyFunction' is not a
member of 'ASP.wfNI206AE_aspx'. I'm trying to research whthese controls can't find the javascript function. Both
the control and the javascript function are contained
within the same set of <form></form> tags.

Anyone know anything about this?

.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shock | last post by:
Hello everyone, I am having a problem with the program below. I have isolated the problem to the onclick event that is located throughout arrQuestions. The onclick event refers to a function...
17
by: Mike Gratee | last post by:
Is it possible to use JavaScript to cause the browser to click a link on a page and have the browser act exactly like the user had clicked on the link directly? In other words, I need to...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
3
by: Jamie Jackson | last post by:
I'm rewriting all links' onclick events, but I'm having a problem. The onclick event that I'm inserting works correctly in Opera, but not in FF or IE. I'm retroactively adding the statement...
2
by: RobG | last post by:
I am trying to dynamically add an onclick to an element, however I just can't get the syntax right. consider the following function: function doClick (evt,x) { // do things with evt and x } ...
2
by: Sedef | last post by:
Hi, i'm trying to create a custom Button user control which will be derived from System.Web.UI.WebControls.Button. the normal server side Button class creates some client side javascript code for...
4
by: Mark Rae | last post by:
Hi, VS.NET 2003 on WinXPPro, both with all the latest patches and updates, etc... I've got a very simple WebForm which is used either to add a new record to a SQL Server database or edit a...
6
by: Nx | last post by:
i've got it all working nicely in firefox, but whenever i test it in IE none of the onclick events are triggered. i'm using an xsl to transform an rss feed into a photogallery. when i try to...
7
by: extremerep | last post by:
My task is to change the value of a button and then make it functional with the onClick handler. Changing the value to "Play Again" works, but making the onClick work accordingly does not. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.