07.10.2007, 10:35
Füge vor {$newpmmsg} das ein:
Code:
<script language="javascript" type="text/javascript">
function thxFunction(uid,puid,pid,tid){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Ajax request was not established!");
return false;
}
}
}
// Create a function that will receive data sent from the server
var txDisp = "displayThx" + pid + tid;
var trDisp = "displayThxtr" + pid + tid;
var ajaxDisplay = getbyID(txDisp);
ajaxRequest.onreadystatechange = function()
{
if(ajaxRequest.readyState == 4)
{
getbyID(trDisp).style.display= '';
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
else
{
ajaxDisplay.innerHTML = '<div><img src="./images/spinner.gif" /></div>';
}
}
var queryString = "&uid=" + uid + "&adduid=" + puid + "&pid=" + pid + "&tid=" + tid;
ajaxRequest.open("GET", "xmlhttp.php?action=thankyou" + queryString, true);
ajaxRequest.send(null);
}
function getbyID(id)
{
var box= '';
if(document.all && !document.getElementById)
{
return box = document.all.id;
}
else if(document.getElementById)
{
return box = document.getElementById(id);
}
else
{
return box = document.layers[id];
}
}
function expandCollapse(id)
{
var check = id.split('_');
var div = getbyID(id);
if(check[2] == 'e')
{
if(div && div.style)
{
div.style.display = '';
getbyID('expcol_'+id).href = getbyID('expcol_'+id).href.replace('_e', '_c');
getbyID('expcol_'+id).id = getbyID('expcol_'+id).id.replace('_e', '_c');
div.id = div.id.replace('_e', '_c');
}
}
else
{
if(div && div.style)
{
div.style.display = 'none';
getbyID('expcol_'+id).href = getbyID('expcol_'+id).href.replace('_c', '_e');
getbyID('expcol_'+id).id = getbyID('expcol_'+id).id.replace('_c', '_e');
div.id = div.id.replace('_c', '_e');
}
}
}
</script>