Welcome Guest, Not a member yet? Register   Sign In
Jquery post help
#8

[eluser]vitoco[/eluser]
sorry...my mistake

Code:
$("#delete_topic").live('click',function()
{
    var diss_id    = $("#dissid").val();
    var post_id    = $(this).attr('name');
    var parent    = $(this).attr('class');
    var path    = $("#url").val();
    var url        = path+"/discussionforum/deletePost";
    var ok        = confirm("Are you sure want to delete this Post?")
    //
    if(ok)
    {
        $.post(
            url,
            {
                "diss_id":diss_id,
                "post_id":post_id,
                "parent":parent
            },
            function(html)
            {
                alert('[['+html+']]');
                if (parseFloat(html) == 1)
                {
                    alert('post deleted');
                    $('#popupClone').hide();
                    location.href = path+"/discussionforum/viewTopic/"+diss_id;
                }    
                else if(parseFloat(html) == 3)
                {
                    location.href = path+"/updateresume/allPostsDiscussions";
                }
                else
                {
                    alert("try again later");
                    location.href = path+"/discussionforum/viewTopic/"+diss_id;
                }
            },
            "text"
        );
    }

});


Messages In This Thread
Jquery post help - by El Forum - 08-21-2010, 12:02 AM
Jquery post help - by El Forum - 08-21-2010, 12:48 AM
Jquery post help - by El Forum - 08-21-2010, 12:54 AM
Jquery post help - by El Forum - 08-21-2010, 01:15 AM
Jquery post help - by El Forum - 08-21-2010, 01:41 AM
Jquery post help - by El Forum - 08-21-2010, 04:48 AM
Jquery post help - by El Forum - 08-22-2010, 11:00 PM
Jquery post help - by El Forum - 08-22-2010, 11:39 PM
Jquery post help - by El Forum - 08-22-2010, 11:43 PM
Jquery post help - by El Forum - 08-22-2010, 11:47 PM
Jquery post help - by El Forum - 08-22-2010, 11:50 PM
Jquery post help - by El Forum - 08-22-2010, 11:55 PM
Jquery post help - by El Forum - 08-22-2010, 11:58 PM
Jquery post help - by El Forum - 08-23-2010, 12:08 AM
Jquery post help - by El Forum - 08-23-2010, 12:16 AM
Jquery post help - by El Forum - 08-23-2010, 01:35 AM
Jquery post help - by El Forum - 08-24-2010, 02:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB