Parker Software Ltd Homepage
Forum Home Forum Home > WhosOn Live Chat > FAQ's
  New Posts New Posts RSS Feed - Working with WhosOn and Onload
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Working with WhosOn and Onload

 Post Reply Post Reply
Author
Message
Liam View Drop Down
Admin Group
Admin Group
Avatar

Joined: 29 Jun 2011
Location: Stoke-on-Trent
Points: 263
Post Options Post Options   Thanks (0) Thanks(0)   Quote Liam Quote  Post ReplyReply Direct Link To This Post Topic: Working with WhosOn and Onload
    Posted: 09 Jan 2012 at 6:08pm
Are you experiencing problems with your invites or do you have a conflict with the websites OnLoad event?
The WhosOn Javascript tracking code requires the OnLoad event in order to track visitors correctly.
If in your webpage you are overriding the OnLoad event you may see behaviour like the invites not working or Visitors remainig in your current Visitor list long after their icon's have turned red.
In order to resolve this you would need to split the javascript tracking code into two parts.
Splitting the following line away from the main javascript:
if(typeof sWOTrackPage=='function')sWOTrackPage();
add woAfterLoad(); so you get
if(typeof sWOTrackPage=='function'){sWOTrackPage();woAfterLoad();}
This then needs to go into your OnLoad event, for example;
<script...
function myOnloadFunction()
{
//my page onload code here
if(typeof sWOTrackPage=='function'){sWOTrackPage();woAfterLoad();}
}
window.onload = myOnloadFunction
</script>
Then you should find that you invites and visitor tracking is working correctly again.
If you have any queries then please let us know.


Edited by James Horton - 21 Feb 2013 at 1:38pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.078 seconds.