Problem using Request.HTML on Opera and Chrome

6 messages Options
Embed this post
Permalink
jeresch

Problem using Request.HTML on Opera and Chrome

Reply Threaded More More options
Print post
Permalink

Hello everyone,

I was a little disappointed when I tried my website on Opera and
Chrome, the new Google's web browser, since it don't correctly work on
it while it has no problem at all with IE, Firefox and Safari.

In fact, I use Request.HTML to load pages into a div, and when I'm
trying to do this, the HTML codes on the loaded page, like é or
è etc... , are not understood by the web browser. Instead, it
give me some errors like this one :

"This page contains the following errors:

error on line 17 at column 409: Entity 'agrave' not defined
Below is a rendering of the page up to the first error."


When the page are not loaded by Mootools' Request.HTML, the page is
correctly displayed.

Here is the code I wrote to load pages :

var options = {url: "site/accueil.php", method : 'get' , update: $
('main_frame'), evalScripts: true};
var monObjetAjax= new Request.HTML(options);
monObjetAjax.send();


Someone would have a little idea how it could work on Opera or Chrome,
or why it doesn't actually work ?
daKmoR-2

Re: Problem using Request.HTML on Opera and Chrome

Reply Threaded More More options
Print post
Permalink

this won't work because of the super secure AJAX request method of
WebKit..

you can't use any html special tags like   or &aecute;
but you may use the hex value for it.. example &aecute; => á
  =>   ...

I do a ugly hack
buffer my output and if webkit is detected replace the tags...
don't even lock exactly the same if you replace the  with  
but it works more or less...

don't know if there is a "better" way...

On Sep 7, 11:41 pm, jeresch <[hidden email]> wrote:

> Hello everyone,
>
> I was a little disappointed when I tried my website on Opera and
> Chrome, the new Google's web browser, since it don't correctly work on
> it while it has no problem at all with IE, Firefox and Safari.
>
> In fact, I use Request.HTML to load pages into a div, and when I'm
> trying to do this, the HTML codes on the loaded page, like é or
> è etc... , are not understood by the web browser. Instead, it
> give me some errors like this one :
>
> "This page contains the following errors:
>
> error on line 17 at column 409: Entity 'agrave' not defined
> Below is a rendering of the page up to the first error."
>
> When the page are not loaded by Mootools' Request.HTML, the page is
> correctly displayed.
>
> Here is the code I wrote to load pages :
>
> var options = {url: "site/accueil.php", method : 'get' , update: $
> ('main_frame'), evalScripts: true};
> var monObjetAjax= new Request.HTML(options);
> monObjetAjax.send();
>
> Someone would have a little idea how it could work on Opera or Chrome,
> or why it doesn't actually work ?
jeresch

Re: Problem using Request.HTML on Opera and Chrome

Reply Threaded More More options
Print post
Permalink

Ok thank you for your help, finally it's not as great a problem as I
thought !

I don't know there was hexa equivalence to the html special
characters. But rather than manually change all the code to hexa,
could you give me please a little example of what you tell me about :
the buffer of the output and the automatic replacment. I really don't
see how you can do to know if webkit is running.
Bob-3

Re: Problem using Request.HTML on Opera and Chrome

Reply Threaded More More options
Print post
Permalink

This is an issue with the mootools code. The ajax request is set to
pull back content as text/xml, and html entities are not valid xml. So
safari and chrome correctly choke. Considering the name of the method
is Request.HTML, it should allow html entities. So the request object
in this case should pull back the content as text/xhtml. I believe the
correction for this is in the next release (not sure when that goes
out). But you can correct this yourself right in the mootools code.
Just search for text/xml and you'll find the right spot.

On Sep 7, 7:52 pm, jeresch <[hidden email]> wrote:
> Ok thank you for your help, finally it's not as great a problem as I
> thought !
>
> I don't know there was hexa equivalence to the html special
> characters. But rather than manually change all the code to hexa,
> could you give me please a little example of what you tell me about :
> the buffer of the output and the automatic replacment. I really don't
> see how you can do to know if webkit is running.
jeresch

Re: Problem using Request.HTML on Opera and Chrome

Reply Threaded More More options
Print post
Permalink

Thanks a lot bob, just a little text/xml to change to text/xhtml and
Safari and Chrome are satisfied ^^
No more strange errors with the html entities !

But there is a last remaining display problem : when I want to display
a form structured by a table, the fields, labels and buttons are not
correctly displayed... it must be refresh by reducing and reopen the
web browser or I have to go over the text with the mouse to make it
display.

Is there a way to avoid that ?
daKmoR-2

Re: Problem using Request.HTML on Opera and Chrome

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bob-3

thx Bob for correcting me...
I was quite on a wrong lead..

I wrote this done for anyone else to find...

http://www.mooforum.net/help12/request-html-for-webkit-safari-chrome-t239.html