SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Nov 2010
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery.ajax() and my problem?

    hello
    what this code have error:
    Code:
    $("#submit").click(function(){
            var dataObj = $(this).closest('form').serializeArray();
            $.ajax({
                type: "POST",
                url: '/zig-co/index.php/home/connect',
                data: dataObj,
                cache: false,
                success: function(){
                    $('#connect').html("<div id='message'></div>");
                    $('#message').html("<h2>فر… ش…ا با …ˆف‚Œت ارسا„ شد.</h2>").append("<p>بزˆدŒ با ش…ا ت…اس خˆا‡Œ… گرفت.</p>").hide().fadeIn(1500, function(){
                        $('#message').append("<div id='checkmark'></div>");
                    });
                },
                error: function(x,y,z) {
                    alert(x+'\n'+y+'\n'+z);
                }
            });
            return false;
        });
    html:
    Code:
    <div id="connect">
    
                            <form action="" method="POST">
    
                                name: <input type="text" name="name">
    
                                <p>
    
                                </p>
    
                                mail: <input type="text" name="email">
    
                                <p>
    
                                </p>
    
                               tell: <input type="text" name="phone">
    
                                <p>
    
                                </p>
    
                               text:
    
                                <p>
    
                                </p>
    
                                <textarea name="text" rows="20" cols="40"></textarea>
    
                                <input type="submit" name="submit" id="submit" value="send">
    
                            </form>
    
                        </div>
    error:
    Code:
    [object Object]
    error
    Not Found
    that true work on the local server(xampp) but not work to host server and get me error:

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2007
    Location
    North Yorkshire, UK
    Posts
    483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The "Not Found" would indicate that "/zig-co/index.php/home/connect" does not exist.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •