C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Javascript »

How to call two javascript function in one button click


Posted Date: 03 Jul 2009    Resource Type: Code Snippets    Category: Javascript
Author: UltimateRenganMember Level: Diamond    
Rating: 1 out of 5Points: 5



In button click we call the two javascript function:-

just drag and drop the button control to Page.
In page load assing the javascript function to button control.

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'bind the alertbox() and confirmbox function to button control
Button1.Attributes.Add("onclick", "alertbox();confirmbox();")
End Sub
End Class

JavaScript Code

< script type ="text/javascript" >
function alertbox()
{
alert("This is first function");
}
function confirmbox()
{
confirm ("This is second function") ;
}
< /script>



Responses


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

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
How to call two javascript function in one button click  .  

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: Display text in status bar using javascript
Previous Resource: Dynamic Color Changing Background Using JavaScript
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use