Click here to Skip to main content
15,886,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
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

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[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900