Updatuje diva za pomocą ajax.update (metodą GET) i dostaje coś takiego (poprawne):
(kod przechwytuję firebugiem)
Kod
<table class="bright-title">
<tr>
<td class="bright-title-left"></td>
<td class="bright-title-center">[T]Edycja profilu[/T]</td>
<td class="bright-title-right"></td>
</tr>
</table>
<form name="editUser" id="editUser" onsubmit="new Ajax.Updater('main-content-ajax', '/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu', {asynchronous:true, evalScripts:true, encoding: 'utf-8', parameters:Form.serialize(this)}); return false;" action="/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu" method="post">
ąść
<div class="form-box">
[ CUT ... ]
<tr>
<td class="bright-title-left"></td>
<td class="bright-title-center">[T]Edycja profilu[/T]</td>
<td class="bright-title-right"></td>
</tr>
</table>
<form name="editUser" id="editUser" onsubmit="new Ajax.Updater('main-content-ajax', '/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu', {asynchronous:true, evalScripts:true, encoding: 'utf-8', parameters:Form.serialize(this)}); return false;" action="/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu" method="post">
ąść
<div class="form-box">
[ CUT ... ]
Po zrequestowaniu za pomocą POST dostaję coś takiego:
Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<table class="bright-title"><tr>
<td class="bright-title-left"></td>
<td class="bright-title-center">[T]Edycja profilu[/T]</td>
<td class="bright-title-right"></td>
</tr></table>
<form name="editUser" id="editUser" onsubmit="new Ajax.Updater('main-content-ajax', '/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu', {asynchronous:true, evalScripts:true, encoding: 'utf-8', parameters:Form.serialize(this)}); return false;" action="/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu" method="post">
<div class="form-box">
<div class="form-box-title">
W formularzu wystąpiłybłędy: </div>
[CUT ...]
<html><body>
<table class="bright-title"><tr>
<td class="bright-title-left"></td>
<td class="bright-title-center">[T]Edycja profilu[/T]</td>
<td class="bright-title-right"></td>
</tr></table>
<form name="editUser" id="editUser" onsubmit="new Ajax.Updater('main-content-ajax', '/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu', {asynchronous:true, evalScripts:true, encoding: 'utf-8', parameters:Form.serialize(this)}); return false;" action="/~hellcoder/ogloszenia/web/frontend_dev.php/edycja-profilu" method="post">
<div class="form-box">
<div class="form-box-title">
W formularzu wystąpiłybłędy: </div>
[CUT ...]
Jak widać pojawia się jakiś DOCTYPE, head, body z kosmosu. Przy okazji psuje się też kodowanie UTF-8.
Używam symfony 1.0.11 i prototype 1.6.0.2.
Czy ktoś wie w czym może leżeć problem?