added js function to make an ajax post to insert a new article