Jump to content
xisto Community
Sign in to follow this  
sashen

Adding Code After Specified Amount Of Time

Recommended Posts

I have some code that will add an image/link after a certain amount of time has passed:

<script  type="text/javascript"><script  type="text/javascript"><!--// JavaScript Document    var videoTimeMinutes = 00;    var videoTimeSeconds = 30;    function showLink() { document.getElementById("divLink").innerHTML = '<a href="http://www.domain.com/ src="http://www.domain.com/image/?; border="0"></a>'; }    // determins how long in milliseconds...    var videoTotalTime = ((videoTimeMinutes * 60) + videoTimeSeconds) * 1000;    var timerId = setTimeout("showLink()", videoTotalTime);function toggle_visibility(id) {var e = document.getElementById(id);if(e.style.display == 'none')e.style.display = 'block';elsee.style.display = 'none';}//--></script>Will add the code here:     <div align="center" id="divLink"></div>

In addition to the link/image, I'd like to add some php to drop a cookie at the same time the image appears (so I know the user has been on the page that long).I've tried every syntax variation I could, but can't seem to figure out how.Any help is much appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.