Question about JavaScript

Discussion in 'Computer Games and General Discussion' started by Wabsta, May 25, 2010.

  1. Wabsta
    OP

    Wabsta you fight like a dairy farmer

    Member
    3
    Apr 25, 2008
    Netherlands
    SCUMM Bar
    I actually never worked with javascript.
    But, I wanted to create a Confirm box on my website.
    So, basicly, this is what I did:
    CODE
    ÂÂÂÂfunction show_confirm()
    ÂÂÂÂ{
    ÂÂÂÂÂÂÂÂvar antwoord=confirm("Weet je zeker dat je deze vragen wilt verwijderen?");
    ÂÂÂÂÂÂÂÂif (!antwoord)
    ÂÂÂÂÂÂÂÂ{
    ÂÂÂÂÂÂÂÂÂÂÂÂwindow.location = "http://www.examplelink.com";
    ÂÂÂÂÂÂÂÂ}
    ÂÂÂÂ}

    That's between the
    And, an input button:
    CODE
    I've tested it by placing an Alert in the "if(!antwoord){ }", and it comes there, but it doesn't redirect me to the link I said at window.location..

    And I have NO idea what the problem is here. Anyone can help me?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice