News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ajax quick reply not working

Started by mirahalo, May 13, 2010, 12:59:32 AM

Previous topic - Next topic

mirahalo

I get the loading... message but it never ends, no mods installed,   fireworks says this:

Error: declaración de texto o XML en un lugar distinto del principio de la entidad
Archivo de origen: http://oharascans.com/foro/index.php?action=quotefast;quote=6642;xml
Línea: 2, columna: 1
Código fuente:
<?xml version="1.0" encoding="UTF-8"?>


Error: oXMLDoc.getElementsByTagName("quote")[0] is undefined
Archivo de origen: http://oharascans.com/foro/Themes/default/scripts/topic.js
Línea: 167


a few lines before and after line 167 of topic.js:

// This is the callback function used after the XMLhttp request.
QuickReply.prototype.onQuoteReceived = function (oXMLDoc)
{
var sQuoteText = '';

for (var i = 0; i < oXMLDoc.getElementsByTagName('quote')[0].childNodes.length; i++)
sQuoteText += oXMLDoc.getElementsByTagName('quote')[0].childNodes[i].nodeValue;

replaceText(sQuoteText, document.forms.postmodify.message);

ajax_indicator(false);
}



the funny thing is that the very same files works fine in a local install.    any thoughts?

Arantor

Define "AJAX quick reply" exactly. What exactly have you tried to do, how would someone recreate this in a testing environment?

tesser

Does you host allow ajax to be installed ?

Mine dont  as it hogs my hosting  company servers if i install ajax  it just wont work full stop.

Arantor

tesser: AJAX isn't something you install, it's a set of technologies. There is actually no way to tell if something is AJAX or not. Have you ever tried using the inline modify option? Or the auto suggest in the send-personal-message areas? Those are powered by AJAX methods.

What I think you're referring to is an AJAX shoutbox, which will hog resources, and is unrelated to this.

mirahalo

ups, sorry, my bad, is the normal quote button, I have quick reply enable so when I click the quote button it takes me to the quick reply box, then the loading... message appears and thats it,   the same goes to the preview button on normal posting,   it is funny because the same files do work on localhost.

I tried upload /Themes/default/scripts/script.js
/Themes/default/Xml.template.php

but nothing's changed

Arantor

So there's something wrong with the XML coming back.

Would be worth examining it in Firebug to see the HTTP request go out and the XML return response to see what actual XML is being returned.

mirahalo


mirahalo

alright, after put my forum upside down I finally did it ;)    it was nothing to do with javascript but with my languages files :P  some of them wasn't encoded in utf8 without BOM.

Advertisement: