Welcome Guest, Not a member yet? Register   Sign In
How do I call MVC Controller from with Javascript function
#2

[eluser]NeoArc[/eluser]
I did not understood your problem correctly, but, you can try using an AJAX enabled Framework, as jQuery:

Code:
jQuery("#form_id").submit(function(e){
  //We detect the submit event, and instead, we request the update using an xmlhttprequest object
  jQuery.post('/base/process/',jQuery("#form_id").serialize(), function(response){
    if(response=='ok'){ alert('ok');}
    else { alert('Not ok'); }
  });
  
  e.preventDefault(); //Do not submit the form.
});


Messages In This Thread
How do I call MVC Controller from with Javascript function - by El Forum - 03-28-2012, 09:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB