Question about JavaScript

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

May 25, 2010

Question about JavaScript by Wabsta at 10:18 AM (439 Views / 0 Likes) 0 replies

  1. Wabsta
    OP

    Member Wabsta you fight like a dairy farmer

    Joined:
    Apr 25, 2008
    Messages:
    2,485
    Location:
    SCUMM Bar
    Country:
    Netherlands
    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?
     

Share This Page