Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. $(document).ready(function () {
  2.  
  3. $("#submit2").on("click", function() {
  4. $("#checkbox").attr("checked", true);
  5.  
  6. // HERE YOU CAN DO SOME OTHER CODE TO SUBMIT FORM
  7. });
  8.  
  9. });
  10.  
  11. <input name="submit" type="submit" id="JustSubmit"/>
  12. <input name="submit" type="submit" onclick="checkedCheckbox()" id="SubmitWithCheckbox"/>
  13.  
  14. function checkedCheckbox()
  15. {
  16. $('#myCheckbox').prop('checked', true);
  17. }
  18.  
  19. <input name="submit" type="submit" id="submit" value="Save" />
  20. <input name="submit" type="submit" id="process" value="Process" />
  21.  
  22. public ActionResult Index(Class Model, string submit)
  23. {
  24. if(submit == "process")
  25. {
  26. Model.Checked = true;
  27. }
  28. //if not...
  29. return View();
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement