Forum Moderators: open
The actual page would be static, the application is in an iframe. I am looking for a way to get the iframe to reflect a different emplyees information everytime a new visitor hits the site.
Thanks for any help as I do not have time to manually distribute leads, and lead software is just not a fit.
Scot
...rotate pages everytime a new visitor hits the site?
Just to be clear, this is every 'visitor' rather than page refresh? IMHO, this sounds more suited to a server-side script such as PHP to ensure it is indeed every 'visitor' and that the same page isn't served to different 'visitors', or doesn't that matter?
You start with a "list" of pages. This list could be dynamically read from a directory (Javascript can't do this, but you can have a list in the Javascript, you'd just have to update it every time a new file is added.)
Then you use some form of random selection to pick a random item from the list.
To insure the same visitor gets a different selection each time, when an item is selected you set a cookie noting the item id or name. Just before picking an item from the list, you read in the cookie and eliminate viewed items from the list. When the list in the cookie gets full, you flush it out and set a new cookie.