I have a website that is using XMLHttpRequest for many pages.
So when visitors click a link, the only thing that is updating is the main div. (not the entire page)
I have a guestbook and other place where i want to use FCKeditor, but when i submit the form and display the guestbook there is no new data.
I have a form with fckeditor, when i submit the form i want to send the data to one php page, and display XMLHttpRequest data in the div that the fckeditor was.
Here is a sample of my code.
function gb_form() { include('../koder/fckeditor/fckeditor.php'); $oFCKeditor = new FCKeditor('gb_form') ; $oFCKeditor->BasePath = '../koder/fckeditor/'; $oFCKeditor->Width = '100%'; $oFCKeditor->Height = '400px'; $oFCKeditor->ToolbarSet = 'Default'; $oFCKeditor->Create(); } function add_guest($profil) { $ret .= '<div class="main_info">'; $ret .= 'Add to guestbook.'; <form id=\"gb\" name=\"gb\" method=\"post\" action=\"koder/guestbook.php\" onsubmit=\"getHtmlData( \'profil_vis\', \'koder/guestbook.php?show_only=guestbook&name='.$profil.'\'); return false;"> <input type=\"hidden\" id=\"owner\" name=\"owner\" value=\"".$profil."\">"; $ret .= gb_form(); $ret .= " <input type=\"submit\" name=\"gb_post\" value=\"Add\" > </form>"; $ret .= '</div>'; return $ret; }
Re: FCKeditor and submit with XMLHttpRequest
in the form, the data is sent to guestbook, but then the whole page updates and return the guestbook.php page
Re: FCKeditor and submit with XMLHttpRequest
Oh yeah, and you'll want to attach that to a form and return false, like....: