Independent
18-06-2008, 05:41 PM
<script type="text/javascript">
function addrep(){
alert('Sorry - but you cannot add reputation to <?php echo $propername; ?>!');
}
function send()
{
var url = 'send.php?from=<?php echo $nivusr; ?>&type=message';
if(window.XMLHttpRequest)
{
httpAjax = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
httpAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
httpAjax.open("POST", url, true);
httpAjax.onreadystatechange = saved;
httpAjax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpAjax.send();
}
function addfriend()
{
var url = '../friend.php?from=<? echo $nivusr; ?>&add=<? echo $propername; ?>';
if(window.XMLHttpRequest)
{
httpAjax = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
httpAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
httpAjax.open("POST", url, true);
httpAjax.onreadystatechange = saved;
httpAjax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpAjax.send();
}
function saved() {
alert("A friend request has been dispatched too <?php echo $propername; ?>\n\nYou have to wait for <?php echo $propername; ?> to accept the request!");
}
</script>
Sorry to hastle, but please could someone fix this code too work in Firefox, I'm not too sure why but this code only works in Internet explorer.
+REP to anybody who helps.
function addrep(){
alert('Sorry - but you cannot add reputation to <?php echo $propername; ?>!');
}
function send()
{
var url = 'send.php?from=<?php echo $nivusr; ?>&type=message';
if(window.XMLHttpRequest)
{
httpAjax = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
httpAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
httpAjax.open("POST", url, true);
httpAjax.onreadystatechange = saved;
httpAjax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpAjax.send();
}
function addfriend()
{
var url = '../friend.php?from=<? echo $nivusr; ?>&add=<? echo $propername; ?>';
if(window.XMLHttpRequest)
{
httpAjax = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
httpAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
httpAjax.open("POST", url, true);
httpAjax.onreadystatechange = saved;
httpAjax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpAjax.send();
}
function saved() {
alert("A friend request has been dispatched too <?php echo $propername; ?>\n\nYou have to wait for <?php echo $propername; ?> to accept the request!");
}
</script>
Sorry to hastle, but please could someone fix this code too work in Firefox, I'm not too sure why but this code only works in Internet explorer.
+REP to anybody who helps.