🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.javascript
Article #3

Re: define pluginspage

#3
From: richjones
Date: Thu, 24 Feb 2000 00:00
66 lines
3356 bytes
Kai,

I'm having similar issue.  How do you want to redirect the user to the
download page?  You can either create a new window using window.open()
or change the location of the current window (window.location=URL).  I
check to see if the user has the plug in, and if not, use a confirm
dialog and window.open, like this:

// Determine which browser is being used.
if (bName == "Netscape" && bVer >= 3) br = "n3";
else if (bName == "Netscape" && bVer == 2) br = "n2";
else if (bName == "Microsoft Internet Explorer") br = "e3";
else br = "n2";

// Open Acrobat Reader download page if plug-in not installed
if (br == "n3" && !navigator.mimeTypes["application/pdf"]) {
   var msg = "Sorry, this pdf file cannot be displayed.\n";
   msg += "Your system does not have Acrobat Reader installed.\n";
   msg += "Click OK to go to the Adobe Web site to download the
          plug-in.";
}
if (confirm(msg)) {
   window.open("http://www.adobe.com/products/acrobat/readstep.html",
               "Download","width=750,height=500,
               innerWidth=750,innerHeight=500,resizable");
}

You have to specify both width and innerWidth for this to work with both
IE and Netscape.  If innerWidth/Height is not defined, a full size
window is created in Netscape.

However, it is non-trivial to detect which plug-ins are loaded in IE.
This is my current problem.  I believe you can use VBScript to inspect
the Registry to see if Acrobat is installed.

Hope this helps.

Rich Jones


In article <38A20F6F.53E84CBF@computerhouseberlin.de>,
  kai@computerhouseberlin.de wrote:
> hi,
> i hope i'm in the right newsgroup...
> i got a very specific problem concerning plugIn download:
> i integrated a pdf reader into a document, so you need to have acrobat
> reader and pdf-viewer installed. if this is not the case i wanted to
> direct the user to a downloadpage that i choose (not mozilla)
> using the command
> pluginspage="http://www.adobe.de/products/acrobat/readstep.html"
> worked but communicator opens a new window without resize or any other
> functions so this turned out to be absolutely useless!
> is thre any possibility in case of this kind of error (lack of plugIn)
> to open a new window with all functions and a URL of my choice that
even
>
> works in netscape and explorer???
>
> thanks,
> kai
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <893r33$1lt$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38A20F6F.53E84CBF@computerhouseberlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10731d,492fc4518fa675c6
X-Google-Attributes: gid10731d,public
X-Google-Thread: f65aa,8086285c2591c255
X-Google-Attributes: gidf65aa,public
X-Google-Thread: fb3cb,492fc4518fa675c6
X-Google-Attributes: gidfb3cb,public
X-Google-Thread: fcc66,492fc4518fa675c6
X-Google-Attributes: gidfcc66,public
From: richjones@usa.net
Subject: Re: define pluginspage
Date: 2000/02/24
Message-ID: <893r33$1lt$1@nnrp1.deja.com>
X-Deja-AN: 589385014
References: <38A20F6F.53E84CBF@computerhouseberlin.de>
X-Http-Proxy: 1.0 x34.deja.com:80 (Squid/1.1.22) for client 208.226.244.80
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Thu Feb 24 17:51:33 2000 GMT
X-MyDeja-Info: XMYDJUIDrejones
Newsgroups: de.comp.lang.javascript,comp.lang.javascript,borland.public.intrabuilder.javascript,fj.comp.lang.javascript
X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I)