Onclientclick passing two functionDevendra Kumar10yAsked Jan 26, 2016, 7:04 PM EST4 answersShareLinkedInXCopy linkSave function validation() {} function getPrices() {}
Onclientclick passing two functionDevendra Kumar10yAsked Jan 26, 2016, 7:04 PM EST4 answersShareLinkedInXCopy linkSave function validation() {} function getPrices() {}
Vipan SharmaRank #1,589 · 999 reputation10y agoPosted Jan 26, 2016, 7:13 PM EST0Can you please explain ? What you are looking ?0
Nishant MittalRank #692 · 3.5K reputation10y agoPosted Jan 26, 2016, 7:14 PM EST0Hi y dont you create 3rd function and call these two function in that like below Function X{ validation(); getPrices();} Anyways u still want in line you can do below : onClientClick="javascript: return validation() && getPrices(); 0
Vipan SharmaRank #1,589 · 999 reputation10y agoPosted Jan 26, 2016, 7:21 PM EST0 if you want to call two function on client click, we have two way : 1 Use semi (;) between two functions.JavaScriptCopy 2. Create Single function that call multiple function: function exampleFunction(){ validation(); getPrices() ; return true; } return exampleFunction();"/>Try It. 0
Manas MohapatraRank #182 · 13.2K reputation10y agoPosted Jan 26, 2016, 7:44 PM EST0If you want to return from both the function then use like below: function validation() { // Implement your logic return true; } function getPrices() { // Implement your logic return true; } OnClientClick="return validation(); return getPrices();"/> Another way is create a function which calls two functions validation and getPrices(). function checkPoint(){ var result = validation(); var result2 = getPrices(); return result; } :ImageButton ID="btn_upload" runat="server" ImageUrl="~/Images/submit.png" OnClick="btn_upload_Click"OnClientClick="return checkPoint();"/>0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vipan SharmaRank #1,589 · 999 reputationPosted Jan 26, 2016, 7:13 PM EST
Nishant MittalRank #692 · 3.5K reputationPosted Jan 26, 2016, 7:14 PM EST
Vipan SharmaRank #1,589 · 999 reputationPosted Jan 26, 2016, 7:21 PM EST
2. Create Single function that call multiple function: function exampleFunction(){ validation(); getPrices() ; return true; } return exampleFunction();"/>Try It.
Manas MohapatraRank #182 · 13.2K reputationPosted Jan 26, 2016, 7:44 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts