Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP/Symfony/Prototype] problem z ajax.update
Exek
post
Post #1





Grupa: Zarejestrowani
Postów: 120
Pomógł: 10
Dołączył: 16.08.2007

Ostrzeżenie: (0%)
-----


Witam, mam problem z symfony + ajax.update.
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 ... ]


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&Auml;…pi&Aring;‚yb&Aring;‚&Auml;™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?
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #2





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Wygląda to jak komunikat błędu. Masz może włączoną opcje repopulate: przy walidacji tego formularza? Ten kod wyglada jak komunikat od repopulate.
Pozdrawiam.
Go to the top of the page
+Quote Post
Exek
post
Post #3





Grupa: Zarejestrowani
Postów: 120
Pomógł: 10
Dołączył: 16.08.2007

Ostrzeżenie: (0%)
-----


Człowieku, jesteś geniuszem! (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

Winę ponosi filtr sfFillin, z tego co zauważyłem to ładuje/zwraca on stronę przez phpowską klasę DomDocument i pewnie stąd te dodatkowe tagi.

PS. Wie ktoś jak wyłączyć takie zachowanie DomDocument? (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 07:46