Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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
Reply With Quote
  #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)
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 07: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



All times are GMT -4. The time now is 08:25 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.