Announcement

Collapse
No announcement yet.

Obnoxious HTML/JavaScript thing I did

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Obnoxious HTML/JavaScript thing I did

    You know that error sound that was used on Windows 98 through WIndows 2000? Well it reminded me of this video:

    Possible photosensitive epilepsy warning ahead!



    Specifically the part at around 16 seconds when a bunch of error boxes come up. Since I'm learning JavaScript I decided to do something similar with a basic HTML5 document. I have no video recording of it, but here's the code:

    Code:
     <html>
      <head>
      </head>
      <body>
          <script type="text/javascript">
              varcount=10;
              functionobnoxious() { 
                      alert("56K Routering Intensifies!"); 
                   varerrorSound=newAudio('errorsound.mp3'); 
                      errorSound.play();
                }
                for(vari=0; i<count; i++){
                      obnoxious();
                }
          </script>
      </body>
      </html>
    If you want to see how it works for yourself then just record the Windows 98 chord video I linked at the beginning as an mp3 and save it "errorsound.mp3" somewhere on your computer. After that, save the code I made above as a ".html" (without quotes) file in the same directory you saved "errorsound.mp3". After that just click on the saved HTML and it should open in your browser of choice (mine was Firefox).

    Muwahaha! I can script things now... annoying things! Click image for larger version

Name:	qk4oAk6.jpg?1.jpg
Views:	2
Size:	950 Bytes
ID:	54459
    Rusakov's Signature
    I'm a fan of anthro cartoons.
  • #2

    Hehe, if I understand your code right, it will throw up 10 alert boxes and play the sound until your count reaches 10. Loops are fun, especially when you start getting a handle on what loops to use for what circumstances.
    Daryn's Signature



    “Just when you think humanity has found the limits of stupid, they go and ratchet up the standard by another notch.” - Bob

    Comment

    • #3

      Originally posted by Daryn View Post
      Hehe, if I understand your code right, it will throw up 10 alert boxes and play the sound until your count reaches 10. Loops are fun, especially when you start getting a handle on what loops to use for what circumstances.
      Well each alert box only comes up after the alert previous to it is clicked off. But yes, that's what it does!
      Rusakov's Signature
      I'm a fan of anthro cartoons.

      Comment

      • #4

        I've made a neater version of the previous code. And since there's support for zip file attachments here, I've attached the whole application! Feel free to try it, either on yourself or your enemies.
        Attached Files
        Rusakov's Signature
        I'm a fan of anthro cartoons.

        Comment

        • #5

          Finally got the setTimeout function to work on it. For those who have the code downloaded then use the text editor to rewrite it like so:

          Click image for larger version

Name:	Screenshot from 2017-12-01 10-19-57.png
Views:	1
Size:	60.0 KB
ID:	54480
          Rusakov's Signature
          I'm a fan of anthro cartoons.

          Comment

          • #6

            Decided to give it a go again (sorry for necro), so far I've got a basic widget going:

            Click image for larger version

Name:	pAkFP8Eh.jpg
Views:	2
Size:	19.8 KB
ID:	58121

            Problem? That's currently a widget made out of HTML tags, I can't do much until I learn how to create the same widget via JavaScript DOM manipulation. I have absolutely no idea on how to do that yet.
            Rusakov's Signature
            I'm a fan of anthro cartoons.

            Comment

            • #7

              Keep at it, man. You don't learn this stuff all at once. It's a learning process.
              Daryn's Signature



              “Just when you think humanity has found the limits of stupid, they go and ratchet up the standard by another notch.” - Bob

              Comment

              • #8

                Progress!



                Click image for larger version

Name:	slowly.jpg
Views:	2
Size:	42.3 KB
ID:	58135

                "How on Earth is that progress!? It doesn't even have a button like before!" I hear you cry out. It's progress, because it's the first time I've created and inserted widgets via DOM manipulation in JavaScript. That is going to be vital in going forward on something like this.
                Rusakov's Signature
                I'm a fan of anthro cartoons.

                Comment

                • #9

                  Congratulations, man. It's a great feeling when you get your head around something that's been eluding you for a while. I'm feeling a lot of that these days with this Doom project.
                  Daryn's Signature



                  “Just when you think humanity has found the limits of stupid, they go and ratchet up the standard by another notch.” - Bob

                  Comment

                  • #10

                    Originally posted by Daryn View Post
                    Congratulations, man. It's a great feeling when you get your head around something that's been eluding you for a while. I'm feeling a lot of that these days with this Doom project.
                    Yep!

                    A person helped point me in the right direction in regards to the JavaScript, now I've got the boxes in the proper order!



                    Now on to making them interactive!
                    Rusakov's Signature
                    I'm a fan of anthro cartoons.

                    Comment

                    Working...
                    X