louis_coetzee 0 Posted June 14, 2010 Share Posted June 14, 2010 Hi, I am trying to make a ajax comment section in a blog inside the posts view.ctp, but I am getting the wrong url in the action part. <?php echo $ajax->form('/comments/add','post',array('update'=>'comments')); ?> <?php echo $form->input('Comment.name');?> <?php echo $form->input('Comment.content');?> <?php echo $form->input('Comment.post_id',array('type'=>'hidden','value'=>$post['Post']['id'])); ?> <?php echo $form->end('Add Comment');?> I get: <form id="form1387038844" onsubmit="event.returnValue = false; return false;" method="post" action="/blog/posts/comments/add"> and the action part must be: <form .......... action="/blog/comments/add"> instead of <form .......... action="/blog/posts/comments/add"> Please help!!! Link to post Share on other sites
bradmasterx 0 Posted July 7, 2010 Share Posted July 7, 2010 You will have to show us the AJAX and form class in order to tell you what is wrong or if your using a framework to tell us what framework your using. Link to post Share on other sites
louis_coetzee 0 Posted July 8, 2010 Author Share Posted July 8, 2010 Hi, I am using cakephp.....sorry for leaving that part out. Link to post Share on other sites
Recommended Posts
Archived
This topic is now archived and is closed to further replies.