new Ajax.Updater($(''toppanel''), ''/ajax/form.php'', { parameters: {}, evalScripts: true, insertion: Insertion.Before }); form.php encoding is utf-8. page encoding is also utf-8. Why response encoding is broken in Safari? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
new Ajax.Updater($(''toppanel''), ''/ajax/form.php'', { parameters: {}, evalScripts: true, insertion: Insertion.Before }); form.php encoding is utf-8. page encoding is also utf-8. Why response encoding is broken in Safari? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Are you sure it''s broken? Remember, Safari cares way more about the actual mime-type headers than anything else, which is why it is so hard to fool with file downloads and the like. Are you explicitly sending a Content-type header from your php script before you print your output to become the ResponseText? header(''Content-type: text/html; charset=utf-8''); print $output; exit; Walter On Feb 28, 2008, at 7:39 AM, Rauan Maemirov wrote:> > new Ajax.Updater($(''toppanel''), ''/ajax/form.php'', { > parameters: {}, > evalScripts: true, > insertion: Insertion.Before > }); > > form.php encoding is utf-8. page encoding is also utf-8. > > Why response encoding is broken in Safari? >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
No, I didn''t. But i sent it in <meta>. On Feb 28, 9:19 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> Are you sure it''s broken? Remember, Safari cares way more about the > actual mime-type headers than anything else, which is why it is so > hard to fool with file downloads and the like. > > Are you explicitly sending a Content-type header from your php script > before you print your output to become the ResponseText? > > header(''Content-type: text/html; charset=utf-8''); > print $output; > exit; > > Walter > > On Feb 28, 2008, at 7:39 AM, Rauan Maemirov wrote: > > > > > new Ajax.Updater($(''toppanel''), ''/ajax/form.php'', { > > parameters: {}, > > evalScripts: true, > > insertion: Insertion.Before > > }); > > > form.php encoding is utf-8. page encoding is also utf-8. > > > Why response encoding is broken in Safari?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
if i add onCreate: function(response) { response.transport.overrideMimeType("text/html; charset=UTF-8"); } it shows normal encoding. But this code block throws exceptions in IE. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
and Opera. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I don''t think that''s going to do the same thing for you. Meta tags are a part of the HEAD of a document, and rely on a complete page being downloaded and parsed. When you work in Ajax, you are only retrieving fragments, and are also doing a bunch of work for the browser -- work that it would ordinarily only do once (on download). Are you able to modify the PHP script that is sending the content back? Setting the Content-type header I indicated is the first thing I would try. Walter On Feb 29, 2008, at 7:59 AM, Rauan Maemirov wrote:> > No, I didn''t. But i sent it in <meta>. > > On Feb 28, 9:19 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: >> Are you sure it''s broken? Remember, Safari cares way more about the >> actual mime-type headers than anything else, which is why it is so >> hard to fool with file downloads and the like. >>--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I did as U advised. It displays content correctly. With content I loaded form. Now when I''m pressing sumbmit button(it should send ajaxrequest and proccess my data. Smth like ajax authorization), it return page "Safari can''t open the page. The error was: "unknown error" ((null):10053)". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 3, 2008, at 8:18 AM, Rauan Maemirov wrote:> > I did as U advised. It displays content correctly. With content I > loaded form. Now when I''m pressing sumbmit button(it should send > ajaxrequest and proccess my data. Smth like ajax authorization), it > return page "Safari can''t open the page. The error was: "unknown > error" ((null):10053)".Here''s what I recall you are trying to do, please correct me if I''m missing something basic. Click a button or other control, Load a form into a DIV, Submit that form using Ajax, Load the response into that same DIV. Do you have evalScripts: true turned on in your initial updater? If not, then the script to run the ajax form request is most likely being stripped out when the updater loads the form into the DIV. I just went through all this on a project I am currently working on, and it *can* work very neatly, but you have to keep your head clear about where all the script is coming from, and what listeners are registered when, and from which script fragment. Walter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yes! :) That is exactly what I''m trying to do. But from first post U could see, that evalScripts is turned on. On 3 мар, 19:50, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> On Mar 3, 2008, at 8:18 AM, Rauan Maemirov wrote: > > > > > I did as U advised. It displays content correctly. With content I > > loaded form. Now when I''m pressing sumbmit button(it should send > > ajaxrequest and proccess my data. Smth like ajax authorization), it > > return page "Safari can''t open the page. The error was: "unknown > > error" ((null):10053)". > > Here''s what I recall you are trying to do, please correct me if I''m > missing something basic. > > Click a button or other control, > Load a form into a DIV, > Submit that form using Ajax, > Load the response into that same DIV. > > Do you have evalScripts: true turned on in your initial updater? If > not, then the script to run the ajax form request is most likely > being stripped out when the updater loads the form into the DIV. > > I just went through all this on a project I am currently working on, > and it *can* work very neatly, but you have to keep your head clear > about where all the script is coming from, and what listeners are > registered when, and from which script fragment. > > Walter--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Okay, so what do you see in Firebug when you submit the form? What headers and POST does your form send, and what is the response back from the server? Walter On Mar 3, 2008, at 2:05 PM, Rauan Maemirov wrote:> > Yes! :) That is exactly what I''m trying to do. > > But from first post U could see, that evalScripts is turned on. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Response Headers Date Thu, 06 Mar 2008 11:19:06 GMT Server Apache/2.2.6 (Win32) PHP/5.2.4 X-Powered-By PHP/5.2.4 Expires Thu, 19 Nov 1981 08:52:00 GMT Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre- check=0 Pragma no-cache Set-Cookie PHPSESSID=d540b0c94a82fa2a11067bdc1b7a9767; expires=Thu, 26 Jun 2008 11:19:07 GMT; path=/; domain=.mysite.kz Vary User-Agent,Accept-Encoding Content-Encoding gzip Content-Length 149 Keep-Alive timeout=5, max=100 Connection Keep-Alive Content-Type text/html Request Headers Host mysite.kz User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3) Gecko/2008020514 Firefox/2.0.0.6;MEGAUPLOAD 1.0 Accept text/javascript, text/html, application/xml, text/xml, */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive X-Requested-With XMLHttpRequest X-Prototype-Version 1.6.0.2 Content-Type application/x-www-form-urlencoded; charset=UTF-8 Referer http://mysite.kz/ Content-Length 138 Cookie PHPSESSID=7d7ec799d7af29b0e1210966d648aeed BTW, It''s strange, that in User Agent set Firefox/2.0.0.6, since I''m using FF 3b3 On Mar 4, 8:59 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> Okay, so what do you see in Firebug when you submit the form? What > headers and POST does your form send, and what is the response back > from the server? > > Walter > > On Mar 3, 2008, at 2:05 PM, Rauan Maemirov wrote: > > > > > Yes! :) That is exactly what I''m trying to do. > > > But from first post U could see, that evalScripts is turned on. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
And what of the content of the response? What do you see in there? Walter On Mar 6, 2008, at 6:10 AM, Rauan Maemirov wrote:> > Response Headers > Date Thu, 06 Mar 2008 11:19:06 GMT > Server Apache/2.2.6 (Win32) PHP/5.2.4 > X-Powered-By PHP/5.2.4 > Expires Thu, 19 Nov 1981 08:52:00 GMT > [snip]--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
If validation successful then just "OK" text, else json-encoded errors array. On Mar 6, 7:35 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> And what of the content of the response? What do you see in there? > > Walter > > On Mar 6, 2008, at 6:10 AM, Rauan Maemirov wrote: > > > > > Response Headers > > Date Thu, 06 Mar 2008 11:19:06 GMT > > Server Apache/2.2.6 (Win32) PHP/5.2.4 > > X-Powered-By PHP/5.2.4 > > Expires Thu, 19 Nov 1981 08:52:00 GMT > > [snip] > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It would really help if you could post an example somewhere so I could watch it fail in real time. This is something that just works -- extremely well -- in every case I have tried. I''m having a hard time imagining what could be going wrong here. Walter On Mar 7, 2008, at 4:09 AM, Rauan Maemirov wrote:> > If validation successful then just "OK" text, else json-encoded errors > array. > > On Mar 6, 7:35 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: >> And what of the content of the response? What do you see in there? >> >> Walter >> >> On Mar 6, 2008, at 6:10 AM, Rauan Maemirov wrote: >> >> >> >>> Response Headers >>> Date Thu, 06 Mar 2008 11:19:06 GMT >>> Server Apache/2.2.6 (Win32) PHP/5.2.4 >>> X-Powered-By PHP/5.2.4 >>> Expires Thu, 19 Nov 1981 08:52:00 GMT >>> [snip] >> >> > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
At the moment I couldn''t do that, ''cause i''m writing project on local machine. Let''s freeze the thread, until I''ll upload it. On 7 мар, 20:14, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> It would really help if you could post an example somewhere so I > could watch it fail in real time. This is something that just works > -- extremely well -- in every case I have tried. I''m having a hard > time imagining what could be going wrong here. > > Walter > > On Mar 7, 2008, at 4:09 AM, Rauan Maemirov wrote: > > > > > If validation successful then just "OK" text, else json-encoded errors > > array. > > > On Mar 6, 7:35 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > >> And what of the content of the response? What do you see in there? > > >> Walter > > >> On Mar 6, 2008, at 6:10 AM, Rauan Maemirov wrote: > > >>> Response Headers > >>> Date Thu, 06 Mar 2008 11:19:06 GMT > >>> Server Apache/2.2.6 (Win32) PHP/5.2.4 > >>> X-Powered-By PHP/5.2.4 > >>> Expires Thu, 19 Nov 1981 08:52:00 GMT > >>> [snip]--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---