Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Start Javascript from a link?

    I've just started to learn Javascript at college, and I made a little code that traps people in a dialogue box loop.

    var escape = 0
    for(escape === 0; escape <= 1
    confirm("Going somewhere?")


    I want to know if there is a site, or a possibility I can start this code, simple by sending friends a URL they can click on. For completely innocent purposes, of course.

    Thanks!

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    The confirm dialog is intended for debugging purposes only. In Opera it always displays a checkbox for turning off JavaScript for the current page and in Internet Explorer it displays a checkbox from the second time a dialog is displayed by the page allowing you to bypass all further dialog boxes.

    If you want to display a dialog that is not for debugging purposes then you should create your own using a lightbox script.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •