Welcome Guest, Not a member yet? Register   Sign In
jquery is not redirecting to controller?
#3

[eluser]solid9[/eluser]
@CroNiX

I already modified the codes, see below,
Code:
$(document).ready(function(){
  $("#submit").click(
function(e){ //pass the event
      e.preventDefault();    
        var swapid=$("#swapid").val();
        var name=$("#name").val();
        var email=$("#email").val();
        var comment=$("#comment").val();
      
        $.ajax({
        type: "POST",
        url: "http://barterswapping.com/main/submit/",
        dataType: "json",
        data: "swapid="+swapid+"&name;="+name+"&email;="+email+"&comment;="+comment,
        cache:false,
        success:
          function(data){
            $("#form_message").html(data.message).css({'background-color' : data.bg_color}).fadeIn('slow');
          }
        
        });
      return false;
    });
});


Is my changes correct CroNix?

By the way thanks for your reply.


Messages In This Thread
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 10:22 AM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 10:28 AM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 10:37 AM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 10:58 AM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 11:11 AM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 11:44 AM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 01:48 PM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 02:54 PM
jquery is not redirecting to controller? - by El Forum - 04-27-2012, 09:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB