So I am now a Comic Character, Shawn has made the team comic characters, There is Ryan, Deanna, Kate and Me – Sheldon
Check out Shawns Big Green Comic !
So I am now a Comic Character, Shawn has made the team comic characters, There is Ryan, Deanna, Kate and Me – Sheldon
Check out Shawns Big Green Comic !
A while ago, I co-wrote a large site with Ryan while I was working at Zipline Interactive, this site uses Mootools 0.98 as we found to be getting a lot of �������� all through the JAX requested response code.
For the life of US, we couldn’t figure out why? it’s not in the output if we called the data via a normal http request, so I looked for a fix.
new Request.HTML({
method: 'get',
url: '/examples/ajax.php',
data: { 'example': 'ajax-ascii' },
encoding: 'iso-8859-1',
onRequest: function() {
$('calendarMainEvent').empty().removeClass('calendarClosed');
$('calendarMainEvent').set('html', '
');
},
onComplete: function(responseTree, responseElements, responseHTML, responseJavaScript) {
$('calendarMainEvent').empty().set('html', responseHTML);
$('calendarMainEvent').setProperty('class','calendarOpen');
},
onFailure: function() {
$('calendarMainEvent').empty().removeClass('calendarClosed');
}
}).send();
< ?php
if($_GET['ajax_request']) {
header('Content-Type: text/html; charset=iso-8859-1');
echo('Success');
/* More output code */
}
It didn’t occur to me right away that I need to specify the charset more than just in the <head> section of the page, but that was all it took.
Of course you want to match your PHP header, Javascript encoding and xHTML charsets all to the same with it is iso-xxx or utf-xx
I noticed when installing the SPAW Editow recently that on the Design tab in SPAW, the HTML was showing as converted HTML Symbols like < and > rather than < and >.
After a bit of playing, i found this hidden piece of information on the SPAW FAQ’s.
You should use getHtml() method instead of show(). It returns the code which you can store into variable and use whenever you need it.