- Joined
- Apr 25, 2008
- Messages
- 2,495
- Trophies
- 0
- Age
- 32
- Location
- SCUMM Bar
- Website
- www.wabsta.com
- XP
- 449
- Country
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?
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?