PDA

View Full Version : Animated Collapsible DIV don't work with other AJAX script



galechus
08-30-2007, 06:55 PM
1) Script Title: Animated Collapsible DIV

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem: Hi, I've a AJAX script to change content on the page.
Script to change content I wrote by my self.

function strona(plik) {
if (plik!='ofirmie' && plik!='galeria' && plik!='pytania' && plik!='kontakt' && plik!='baza' && plik!='partnerskie' && plik!='wspolpraca' && plik!='pracownik' && plik!='poszukiwanie') return false; // zabezpieczenie
var xml = null;
var wynik = document.getElementById("tresc");
wynik.innerHTML = "Trwa ladowanie strony";
if (window.XMLHttpRequest) xml = new XMLHttpRequest();
else if (window.ActiveXObject) xml = new ActiveXObject("Microsoft.XMLHTTP");
if (xml) {
xml.onreadystatechange = function() {
if (xml.readyState==4) {
wynik.innerHTML = xml.responseText;
}
}
xml.open("GET", plik+".php", true);
xml.send(null);
}
return false;
}
strona('ofirmie');

Then if I wont load a page with Animated Collapsible DIV script from external file (php) It doesn't work correctly.

http://www.bezjahzgh.com/kamil/se/
link: frågar
Check how it works or don't work