Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript Ajax C#4.0 jQuery MVC3 , +
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 at 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
0 Sergey Alexandrovich Kryukov 398
1 CPallini 333
2 George Jonsson 270
3 OriginalGriff 159
4 Prasad Khandekar 135
0 OriginalGriff 4,613
1 CPallini 3,340
2 Sergey Alexandrovich Kryukov 2,771
3 George Jonsson 2,254
4 Gihan Liyanage 2,020


Advertise | Privacy | Mobile
Web04 | 2.8.140905.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2014
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