Bulevardi
12-01-2008, 12:26 PM
1) Script Title: Dynamic Ajax Content
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem: I load a guestbook in the content, like this:
<a href="javascript:ajaxpage('guestbook.php', 'content');">test</a>
<div id="content"></div>
Works great.
Until I want to add a comment in the book with a form, it doesn't work anymore:
<form action="gbscript.php" method="post" >
... form fields...
gbscript.php adds the comment to a mysql database and than the gbscript needs to load the updated guestbook back in the content:
if($added_to_database) {
include ("guestbook.php");
}
But that last part doesn't work.
If you click the 'send' button on the guestbook form after filling in the form, the gbscript.php starts to load, but there's no result coming back in the content div.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem: I load a guestbook in the content, like this:
<a href="javascript:ajaxpage('guestbook.php', 'content');">test</a>
<div id="content"></div>
Works great.
Until I want to add a comment in the book with a form, it doesn't work anymore:
<form action="gbscript.php" method="post" >
... form fields...
gbscript.php adds the comment to a mysql database and than the gbscript needs to load the updated guestbook back in the content:
if($added_to_database) {
include ("guestbook.php");
}
But that last part doesn't work.
If you click the 'send' button on the guestbook form after filling in the form, the gbscript.php starts to load, but there's no result coming back in the content div.