Click here to Skip to main content
12,950,272 members (66,380 online)
Rate this:
 
Please Sign up or sign in to vote.
Hi friends, i need some help.
Condition in the home view
I have and if conditon
if{ conditon 1 }
else { condition 2 }

button

i have a javascript for the button click to perform condition 1 and call the action result in the controller

i have a javascript for the button click to perform condition 2 and call the action result in the controller

now i need to give a javascript where i tell the button if condition 1 is satified then choose condition1 javascript and call the action result for that in controller.

Or if condition2 is satisfied then the button should choose the condition2 javascript and call that respective action result in controller

I have two action results in the controller for a button click in the controller. How do i do this..Can anyone help
Posted 19-Nov-12 4:21am
Comments
Nelek 19-Nov-12 10:40am
   
Please don't think we can read minds or do astral projections to see your monitor. If you need help, the least you could do is to add some relevant code to your question or to explain your problem in such a way, that the users of CP can understand it. Otherwise, nobody will be able to help you.
what have you tried?[^]

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

What you mention in your question makes me think of validation being a possibility?
Client Side Validation using JavaScript[^]

But it would be a good idea to read up on Javascript Conditional Statements
http://webcheatsheet.com/javascript/if_else_switch.php[^]

And then read up on Javascript Functions.
http://webcheatsheet.com/javascript/functions.php[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,829
CHill60 3,460
Maciej Los 2,953
Jochen Arndt 1,975
ppolymorphe 1,820


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100