So, You Want A Pop-Up Link Box, Huh?

By Joe Burns

https://www.htmlgoodies.com/beyond/java/article.php/3470761/So-You-Want-A-Pop-Up-Link-Box-Huh.htm (Back to article)

Use these to jump around or read it all...
[Here We Go]
[The Applet]
[The Source Code]
[Configuring It For Your Needs]
[Posting It On Your Page]

First Java Things First: This is a tutorial dealing with a Java Applet. These little guys are picky. They like to be run on 32-bit platforms only. That means you must be running Windows 95 or a higher level of MAC OS or OS/2. You'll also need a 32-bit platform browser. Head to the Netscape or the Explorer home pages and grab one for yourself. Also, in case you're wondering, according to the November 25th edition of COMPUTERWORLD, there is a Java plug-in that may soon be available that will allow applets to run on Windows 3.x. The problem is you'll probably have to buy this one.

Here We Go...

     I get at least a letter a week asking if you can turn the pop-up box I show in my forms tutorial into something that will take people to other pages. With just HTML commands, no. Using a Java applet, yes. And here it is:

     Go ahead, click on it. It will drop down and the choices you can make will be shown. Choose one, and you're off to that page. Neat trick, huh? I should have one of those at the bottom of each of my tutorials. But I have one on this tutorial, and that's what we're concerned with for now, isn't it?

The Applet

     You're going to need two things for this pop-up box to work for you: The Applet and its Source Code. The applet's name is "link.class." Click here to get it:

Here's the Applet!

     When you click on the link above, it may look like I'm foolin' you because you'll only see some strange writing up in the left-hand corner. Don't fret! That's it! Save it as "source" or "All Files" or "Raw Data" depending on what your browser allows. Saving it as text will mess it up!

     To ensure a good download, Netscape users can hold the shift key while clicking. MSIE users can click the right mouse button and choose to download. MAC users can hold the mouse button and choose download. Doing this often solves later problems.

The Source Code

<APPLET CODE="link.class" WIDTH=150 HEIGHT=70>
<PARAM NAME="target" VALUE="_top">
<PARAM NAME="bgColor" VALUE="white">
<PARAM NAME="number" VALUE="5">
<PARAM NAME="link0" VALUE="Select a Link\\not a link">
<PARAM NAME="link1" VALUE="CBS Home Page\\http://www.cbs.com">
<PARAM NAME="link2" VALUE="CNN Home Page\\http://www.cnn.com">
<PARAM NAME="link3" VALUE="Ford Home Page\\http://www.ford.com">
<PARAM NAME="link4" VALUE="Shareware Home Page\\http://www.shareware.com">
<PARAM NAME="link5" VALUE="Hair Club For Men\\http://www.hairclub.com">

Just cut and paste it from here!

Configuring It For Your Needs

     If you just copy what I have above, you'll get the five links that I have requested of the applet. If that's good enough for you, great. You're done. If not, you'll need to change things around to work for you. Here's how we do it:

Posting It On Your Page

[Here We Go]
[The Applet]
[The Source Code]
[Configuring It For Your Needs]
[Posting It On Your Page]