Jump to content

ReGA

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ReGA

  • Rank
    Newbie

Previous Fields

  • Languages
    HTML (DOM), Javascript, PHP, MySQL

Profile Information

  • Location
    Belgium
  • Interests
    Minecraft, Programming
  1. Just use the onload event for the body element to show the box.Then it won't be called when clicking the text "CLICK HERE", but it will be called when the page loads.
  2. If you limit the number of 'checks', it will not have much effect on your friend's server. Maybe you could make something that only checks this every 5-10 minutes, and showssomething like: "Last check: 7 min ago" Just an idea
  3. Hey, I googled a little and found this (I didn't make this):http://jsbin.com/owawuq/2/edit Try to change some styles, and you'll be able to get your wanted gray background.
  4. Odd... Thanks for your replies anyway, guys.
  5. You will have to add an event to your video tag: onended. Then, you need a function that can be called from the video element. Example: <script> function redirect() { document.location="index_2.html"; }</script> <video src="index_vid.WEBM" onended="redirect()">Your browser cannot display the video element.</video> When the video has ended, the function redirect() will be called.In this function, we change the client's location. I hope this helps.
  6. Yes, the event onkeydown gets called repeatedly if you hold a key.I had a similar problem in firefox. But this only happens after a certain delay. You can avoid this by using an onkeyup event: <html><head><script>var hasPressed=false;function myFunction(e,keyDown) { if (hasPressed && keyDown) return; hasPressed=keyDown; // Code}</script></head><body><input type="text" onkeydown="myFunction(event,true)" onkeyup="myFunction(event,false)"></body></html>
  7. Hmmm... Yeah, tutorials are a good idea. But here are some examples any way: If, else: yourName=prompt("Please enter your full name:","John Johnson");if (yourName=="John Johnson") { alert("You used the standard name!");}else { if (yourName.length<=5) alert("Your name is a little short..."); else if (yourName.length>5 && yourName.length<=25) alert("I like your name..."); else { alert("Your name is too long."); }} Or this: yourName=prompt("Please enter your full name:","John Johnson");if (yourName=="John Johnson") { alert("You used the standard name!");}else if (yourName.le
  8. I'm using this function to detect whether a key is being hold: var keyDown=new Array(false,false,false,false,false,false); function keys(e,isDown) {keynum=-1;if (e.which) { keynum=e.which;}else if (window.event) { keynum=e.keyCode;}if (isDown && keynum==32) alert("Spacebar!"); // Test 1if (keynum==38) { // Arrow-up keyDown[0]=isDown;}else if (keynum==39) { // Arrow-right keyDown[1]=isDown;}else if (keynum==40) { // Arrow-down keyDown[2]=isDown;}else if (keynum==37) { // Arrow-left keyDown[3]=isDown;}else if (keynum==32) { // Spacebar keyDown[4]=isDown; if (isDown) alert("Spac
×
×
  • Create New...