Search the Community
Showing results for tags 'pause'.
-
Hey there, I've been dabbling with some Javascript and I've been okay adding code in where I wanted until I came to the last part of this executing script. Basically what happens here is the Button Play Flash Game Click Here will pop open a hidden Div that shows places that they can vote at to play the game... Then what I need to happen is after the Vote Click a count down timer pops up to force a 10-15 second wait before the ShowDiv appears. I found that the script immeditately runs once the page is loaded and I have it at a 10second wait, so if I wait 10 second before clicking on anything I'll find that the Div Will Already be shown but if I quickly move through the vote it will take the 10 seconds to appear. So again what I need is for it to start the count down AFTER the vote has been cast. I'm totally newbish when it comes to Javascript I'm just good at creating frankeinsteined code by researching snippits. So please make sure you take it slow with me on this, anything outside the box of copy and paste and it might confuse the hell out of me unless you can explain a tiny bit of whats going on! I appreciate it - here's the code I'm currently using: <script type="text/javascript"> function toggle(obj){ var obj=document.getElementById(obj); if (obj.style.display == "block") obj.style.display = "none"; else obj.style.display = "block"; } </script> <br> <a href="javascript: void(0);" onClick="toggle('q1')"><center>Play Flash Game Click Here:</center></a> <div id="q1" style="display:none;"><center> <a href="javascript:ShowDiv()" onclick=window.open('http://site1.com')>Vote Site #1</a> <a href="javascript:ShowDiv()" onClick=window.open('http://site2.com')>Vote Site #2</a></div> <div id="HiddenDiv" style="display:none;"><div id="my_div"></div> <script type="text/javascript"> (function (){ var element_id = 'my_div' ; var link_text = '<center>(FLASH GAME CODE EMBEDDED HERE)</center>'; //link code var time = 10; setTimeout(function(){document.getElementById(element_id).innerHTML = link_text;},time*1000); })(); </script></div> <script language="javascript"> function ShowDiv() { document.getElementById("HiddenDiv").style.display = ''; } </script>
-
- javascript
- pause
-
(and 2 more)
Tagged with:
-
Hello follow programmers, I have a little question regarding my PHP code. I now have a perfect working code that takes my frame heigth and width and adjusts the image to the frame. Works great. The issue now is, I have multiple images in my dolder, how can I play them with a delay of say.. 10 seconds? Here is the piecer of my code that matters: Of course I have to count the images in the folder but how do I play them with a short break in it. <?php $img_folder = "../fotos/"; $imgs = dir($img_folder); while ($file = $imgs->read()) { $lengte = (strlen($file)-3); $extentie = substr($file,$lengte,3); //print "extentie $lengte = $extentie <br>"; if($extentie == "jpg" || $extentie == "JPG" || $extentie =="jpeg" || $extentie =="gif" || $extentie =="bmp"){ //print "tada<br>"; $size = getimagesize($img_folder.$file); $hoog = $size[1]; $breed = $size[0]; if(($breed/$screenW)>($hoog/$screenH)){ print"<img src=\"$img_folder$file\" width=\"$screenW\">"; }else{ print"<img src=\"$img_folder$file\" height=\"$screenH\">"; } } } closedir($imgs->handle); } ?> Thanks in advance! Dave