1

i am using this example to create a comment system. So far works great.

What i want to do is to add one more form that will insert comments in the database exactly like in that example just use another commentajax.phpwitch ill rename to commentajax1.php in where ill use a different sql statement.

i see the jquery POST $(".submit").click(function() {...} works when a doom element with class="submit" is activated. Will it be enough to create another jquery that is called by another class?

thanks,

1 Answer 1

1

Look at this part:

$.ajax({
type: "POST",
url: "commentajax.php",
data: dataString,
cache: false,
success: function(html){
$("ol#update").append(html);
$("ol#update li:last").fadeIn("slow");
$("#flash").hide();
}
});
}return false;
});

It do AJAX to "commentajax.php".

If you create another click event that invoke different AJAX call to different url you will be fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.