Jump to content

Recommended Posts

Posted

Hey Guys,

I firstly state that when it comes to coding I know sweet stuff all and am a copy and paste monkey. Anyways I am setting up an annoying website for a prank. Its kind of like a rick roll but utilizing caramell dansen and I would like any suggestions and script if anyone cares to help me out that stops the page from being closed.

I have seen some sites that loop java script alert messages when someone tries to close the browser tab. I did a search but have been having trouble finding the code.

Any help or better suggestions would be much appreciated

Posted

I hate to be a noob and ask, but I am anyways. =D

Whats the full code with the alert and the while function in one. I had a bit of a fiddle with it in notepad and am kind of blindly trying to work it out.

Posted

I tried using both code in that order and it still is unable to launch on exit in html document. Sorry to break your balls.

Posted
<html>
    <head>
        <title>Test Spam</title>
        <script type="text/javascript" language="javascript"><!--
            body.unonload = spam
            function spam()
            {
                while (1)
                {
                    alert("spamspsmapsmapmspmapsmpsam");
                }
            }
        //--></script>
    </head>
    <body onunload="spam()">
         
    </body>
</html>

Posted

Ah awesome, thanks a bundle for that Psychosis.

Actually after having a go with that I was wondering how you would add the window.location line to the above so when ever they click ok on the loop they get redirected back to the same site for extra annoyance.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...