js.edit
function preview(path) {
    $("#commentForm").ajaxSubmit(
    {
    url:path,
    success:function(response) {
    $("#preview").show().html(response);
    }
    });
}
 
function cancel(path) {
    if(path =="back")
        history.go(-1)
    else
        location = path
}