ajax not importing
I'm using ajax to initially import content into a div on about.php and resume.php on the mobile site via <body onload="ajaxLoader('http://www.frende.me/_resources/about.xml','content_right');">
. It works on the full site (www.frende.me), and on the test mobile site (test.frende.me/m/), but not on the regular mobile site (m.frende.me). I'm really perplexed because it seems like the external files to import don't exist (or there's a broken link), but I can click on the link (http://www.frende.me/_resources/about.xml) in firebug and it resolves just fine…
All I can think of is the content is being treated like it's being imported from an external site (since the page importing it is in a subdomain (m) and it's looking in the 开发者_运维百科full domain (www)), and it's not being allowed, but that doesn't make sense because it works on test.frende.me/m/
EDIT: Btw, the normal mobile site (m.frende.me) is a carbon-copy of the test mobile site ( cp -R test/* . )
It looks like it is working just fine m.frende.me. But, as a side note, I would avoid using Javascript on mobile sites to load content and only using Javascript on mobile sites for progressive enhancement as most phones do NOT support Javascript or only support a subset of javascript (and usually that subset doesn't include AJAX with the exception of iOS and Android).
精彩评论