Shokwave Software, Inc. -      Web Deco Kit

The Question Applet

Description

The Question applet lets you ask a question and navigate to one of several URLs based on the reply. It's useful for taking surveys or getting people to one of several different URLs within a website in one jump. The URLs for the destinations can include calls to CGI counters or other mechanisms - any valid URL will work.Size: about 3,500 bytes

Examples

(for each example on the left, the HTML that generated it is on the right)

Sorry, your browser does not support Java, so you can't see this brilliant hack.

Selecting any but the first item takes you to the URL associated with that item. The background color allows the applet to clear its area to some pleasing color while the image loads. The Position parameter is associated with a "border" style layout. This lets you put the pop-up at the North, South, East or West positions on the graphic (south is recommended).


<APPLET CODE="Question.class" CODEBASE="Java" 
     WIDTH=160 HEIGHT=100 ALIGN=middle>
<PARAM NAME="ItemCount" VALUE=5>
<PARAM NAME="MenuItem1" VALUE="Pick One...">
<PARAM NAME="MenuItem2" VALUE="Bill Clinton">
<PARAM NAME="URL2" VALUE="http://www.elect_bill.com">
<PARAM NAME="MenuItem3" VALUE="Bob Dole">
<PARAM NAME="URL3" VALUE="http://www.elect_bob.com">
<PARAM NAME="MenuItem4" VALUE="Ross Perot">
<PARAM NAME="URL4" VALUE="http://www.elect_ross.com">
<PARAM NAME="MenuItem4" VALUE="None of above">
<PARAM NAME="URL4" VALUE="http://www.elect_none.com">
<PARAM NAME=Position VALUE=South>
<PARAM NAME="Background" VALUE=255,255,255>
<PARAM NAME="BGImageURL" VALUE="poll.gif">
Sorry, your browser does <B>not</B> support 
     Java, so you can't see this brilliant hack.
</APPLET>
Sorry, your browser does not support Java, so you can't see this brilliant hack.

This example is the same, except that the menu is placed "east". Different browsers react differently to these layout instructions. You'll need to test these to make sure they work correctly in different browsers.


<APPLET CODE="Question.class" CODEBASE="Java" 
     WIDTH=160 HEIGHT=100 ALIGN=middle>
<PARAM NAME="ItemCount" VALUE=7>
<PARAM NAME="MenuItem1" VALUE="Name it...">
<PARAM NAME="MenuItem2" VALUE="Whiskey">
<PARAM NAME="URL2" VALUE="http://www.drink_whiskey.com">
<PARAM NAME="MenuItem3" VALUE="Gin">
<PARAM NAME="URL3" VALUE="http://www.drink_gin.com">
<PARAM NAME="MenuItem4" VALUE="Tequila">
<PARAM NAME="URL4" VALUE="http://www.drink_tequila.com">
<PARAM NAME="MenuItem5" VALUE="Vodka">
<PARAM NAME="URL5" VALUE="http://www.drink_vodka.com">
<PARAM NAME="MenuItem6" VALUE="Rum">
<PARAM NAME="URL6" VALUE="http://www.drink_rum.com">
<PARAM NAME="MenuItem7" VALUE="Scotch">
<PARAM NAME="URL7" VALUE="http://www.drink_scotch.com">
<PARAM NAME=Position VALUE=East>
<PARAM NAME="Background" VALUE=255,255,255>
<PARAM NAME="BGImageURL" VALUE="poison.gif">
Sorry, your browser does <B>not</B> support 
     Java, so you can't see this brilliant hack.
</APPLET>

Parameters

The Question applet takes the following parameters:

ItemCountNumber of items in menuRequired
MenuItemNOne of these for each menu item, text of this itemRequired
URLNURL associated with MenuItemNRequired
PositionSouth, North, East, WestRequired
BackgroundR,G,B of backgroundOptional
BGImageURLURL of background imageRequired
Outside of PARM tagsHTML for those with non-Java browsersOptional



Web Deco Kit Page     Shokwave Home Page