Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

[ View the whole list ]


Most users ever online was 9 on Sun Jul 09, 2017 2:04 am
Statistics
We have 15 registered users
The newest registered user is bilde

Our users have posted a total of 271 messages in 27 subjects
deleted after updated

visitor message notification

View previous topic View next topic Go down

visitor message notification

Post by Admin on Thu Dec 22, 2011 3:11 pm

PLEASE NOTE: for this tutorial to work you must have installed this: http://www.diondesigns.org/t440-example-9-accessing-user-information-all-boards

avatar
Admin
Admin

Avacweb
Posts : 231
Points : 282
Join date : 2011-11-07

View user profile http://testlg.forumotion.co.uk

Back to top Go down

Re: visitor message notification

Post by Admin on Thu Dec 22, 2011 4:05 pm

Code:

var a=new XMLHttpRequest();
a.open("GET","/u" +uid+ "wall",true);
a.send();

a.onreadystatechange=function() {
  if (a.readyState==4 && a.status==200)  {
      var x=a.responseText.indexOf('title="New message" /> by ');
      if (x != -1) {
        var c=a.responseText.substring(x,a.responseText.indexOf('</a>',x)+4);
        var user=c.substring(26,c.length); alert(user); 
        var html="<div id='LGnewVM'>Notification: '"+user+"' has left you a Visitor Message!<br><br><span onclick=\"document.getElementById('LGnewVM').style.display='none';\">Close</span></div>";
        document.body.innerHTML+=html;
      }
  }
}
phpbb3.
avatar
Admin
Admin

Avacweb
Posts : 231
Points : 282
Join date : 2011-11-07

View user profile http://testlg.forumotion.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum