PDA

View Full Version : Sdmenu dynamic text element



adominique
06-20-2007, 01:45 AM
** Sd menu **
I wish to change dynamically the menu text elements (to switch language) on menu loading.
Data to be loaded are kept in a xml file which is selected according to language needed (ie engish, french, etc...)

I am trying to use an onload function to append the data with this type of command:
*******************************************************
function loadXML()
{
var language = "../language/<?php echo $language;?>";

xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.load(language);
xmlDoc.onload=getlang;

function getlang() {
document.getElementById("title").innerHTML=xmlDoc.getElementsByTagName("t160")[0].childNodes[0].nodeValue;
}
*******************************************************

But apparently, I have a conflict with sdmenu script which freeze and text elements are not updated accordingly.

How could I merge the sdmenu script and this script to dynamically load and change text data in the menu on load?

Thanks