C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Call a Javascript Funtion on a Click Event


Posted Date: 23 Jun 2008    Resource Type: Code Snippets    Category: Javascript

Posted By: Kapil Dhawan       Member Level: Gold
Rating:     Points: 3



The code sample is a Javascript function that will be called on the occurrence of a click event. It just brings a alert box that warns the user about something. Here, it just says "I am Kapil Dhawan". The alert box could do more useful things too.


function myTestFuntion()
{
alert("I am Kapil Dhawan");
}


The code snipet below is an example of how to call a function on occurrence of a certain event. The code is that for a button that has "submit" caption in it. It is designed to handle a click event. When the user clicks the button, the function "myTestFunction" is called.


<input type="button" onclick="myTestFuntion()" value="Submit"&RT;




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
OnClick Event for a Button  .  Handling the Onclick Event for a Button in Javascript  .  Handling the OnClick event for a Button  .  Event Handling in Javascript  .  Calling Javascript Functions  .  Calling Functions in Javascript  .  Calling Functions at Events  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Declaring Variables in JavaScript
Previous Resource: Get Browser Language using JavaScript
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

UK Conference calling Company

Contact Us    Privacy Policy    Terms Of Use