View Single Post
Old 03-14-2012, 07:47 PM   PM User | #11
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,306
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
i screwed up sorry, syntax problem. I fixed it:

Code:
$(function () {
    $("#requestform").live("submit", function (e) {
        e.preventDefault(); //prevernt default form sumbit action
        var SubmitURL = "/staffpanel/_frontend/requests.php";
        var dataString = $('#requestform').serialize();
        $.ajax({
            type: "POST",
            url: SubmitURL,
            data: dataString,
            success: function () {
                alert("request sent!");
            }
        });
    });
});
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote