Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To 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
  #1 (permalink)  
Old March 9th, 2005, 12:19 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
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 change this alert/confirm box

I have a else statement in my <script> block:

else
{
    // Acrobat is NOT installed. Do something else.
    document.write("Acrobat is NOT installed.")
    alert ("You do not have Adobe Acrobat Installed. Click OK to download this software")
}

does anyone have code so i could change this alert/confirm box so that if a 'OK' button on the box is clicked then go to a page on the Adobe site. else if a 'continue' button is clicked then submit the form on the page.



www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
  #2 (permalink)  
Old March 9th, 2005, 12:48 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You need the confirm button, which always shows 'OK' or 'Cancel':
Code:
if (confirm("Choose 'OK' to download Acrobat Reader now, choose 'Cancel' to continue."))
{
  window.location = <url for reader download>;
}
else
{
 //continue ...
}
--

Joe (Microsoft MVP - XML)
  #3 (permalink)  
Old March 9th, 2005, 01:09 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
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

hey joe,
i have a new problem
when the 'File Download - Security Warning' dialogue box appears when cancel button is clicked i want to redirect to the previous page:

Code:

question = confirm("You do not have Adobe Acrobat Reader Installed on your system. \n\nClick OK to download this software now. Click Cancel to go Back")
    if (question !="0"){
        top.location = 'http://ardownload.adobe.com/pub/adobe/reader/win/7x/7.0/enu/AdbeRdr70_enu_full.exe'
    }
    if (question =="0"){
        history.back()
    }

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
  #4 (permalink)  
Old March 9th, 2005, 01:11 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
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

this is after the 'OK' has been hit

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript confirm box with just an 'OK' button crmpicco Javascript How-To 28 March 12th, 2014 06:44 AM
Change Labels on confirm box. kndubey Javascript How-To 2 February 22nd, 2007 08:11 AM
JavaScript Confirm Box ricespn Classic ASP Basics 1 January 20th, 2007 12:48 AM
Need help with this confirm alert script, Please! larry Javascript How-To 1 January 26th, 2004 02:42 PM
Confirm alert box - need help, Please! larry HTML Code Clinic 1 January 25th, 2004 02:07 AM





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