Hi there, I have a site that uses the cpa lead gateway system that is activated when a user clicks through to a page.php to view a embeded video. I would like to delay the script from activating for a set time that I choose (e.g. 60 seconds or more). The code at present is placed at the top of the video.php before the first <?php tag. The code examlpe is: <script src="http://www.cpalead.com/gateway.php?pub=????" language="JavaScript" type="text/javascript"></script> Is there a simple way to add a delay function to this script, if so can you show me an example with the above script included? Many thank's for taking the time to help on this problem!
that would be javascript, and not PHP. Php is serverside, you can't stop this unless you use sleep() or something, but that's not what you want
I don't know if that would work, but here's a solution. Put these div tags in your head tags. <div id="script_goes_here"></div> then after these div tags add the js code <script type="text/javascript"> function loadJS() { document.getElementById('script_goes_here').innerHTML='<script src="http://www.cpalead.com/gateway.php?pub=????" language="JavaScript" type="text/javascript"></script>'; } setTimeout('loadJS()',60000); </script> Code (markup):