Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2005, 08:08 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default window.location


Code:
var answer = confirm("You will be redirected to the Flight Search screen");
                if(answer)
                {
                    window.location="airbook.asp";
                }
                else
                {
                    window.location="airbook.asp";
                }
Is there a shorter way to code this?
Basically i want a confirm pop-up that will go to
airbook.asp no matter what button you click?

TIA.

Picco

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old July 7th, 2005, 08:55 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Either:
Code:
alert("You will be redirected to the Flight Search screen.");
window.location="airbook.asp";
or
Code:
confirm("You will be redirected to the Flight Search screen.");
window.location="airbook.asp";
depending on what style of message box you want.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
window.location.reload(false); crmpicco Javascript How-To 2 September 4th, 2008 04:21 AM
Browser window: Specifying the size and location? asearle HTML Code Clinic 2 November 22nd, 2007 08:50 AM
window.location and page encoding arabuafef Classic ASP Professional 0 February 19th, 2007 06:23 AM
Window Size and DIV location TSEROOGY Javascript 6 August 30th, 2004 10:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.