Draw a separate image box on the page for each of your images, and
import the images. Initially, set them up so they are not stacked on
top of each other, so you can see them all at once. Write down the
value of the Title field in the Inspector, which is analogous to the
ID attribute of the DIV containing each image.
Now make your select picker. Add an option for each of your images. In
the Value field, enter each ID that you got in the first step EXACTLY
(case matters here). In the Choice field, enter whatever text you want
to be visible in the option.
While the select picker is still selected on the page, choose Item /
Extended from the main menu. Click New, then in the Name field enter
id and in the Value field enter myPicker. If you drew your picker as a
layer item, the Extended dialog will offer you a number of options
where your extended attributes will apply. You need to choose the one
labeled < select >.
If you have more than one of these pickers on the page, you must give
each of them unique IDs. Legal IDs always begin with a regular ASCII
letter (no accents or diacriticals) and never contain spaces or
punctuation (except for the underscore). Since you are adding this
long-hand, Freeway will not fix things for you if you enter a
duplicate or invalid ID.
The last part of this is a little bit of JavaScript. First, apply the
Protaculous Action to your page. http://actionsforge.com/find/protaculous
Next, set the Library picker to protaculous-packed. Click on the top
Function Body button and enter the following script, substituting your
image names where I have item1, item2, etc. Each image name needs to
be preceded by a hash mark (#).
var list = $$('#item1, #item2, #item3, #item4').invoke('hide');
list.first().show();
var showMe = function(evt){
var picker = $(this);
list.invoke('hide');
$($F(picker)).show();
}
$('myPicker').observe('change',showMe);
Test this out in a browser. You should see all but your first image
hide, and when you change the picker, the corresponding image should
appear. Now you can move the images so that they all occupy the same
x,y coordinates and your illusion should be complete.
If you don’t see this working, use Firefox with Firebug to note the
issue, and / or post a link here so we can help you figure out the
problem.
Walter
On Apr 23, 2010, at 3:26 PM, Neil wrote:
Hi all,
I would like to present the site visitor will a drop down list like
the one set up using the html form element, which generates an image
relative to the current choice.
For example a pull down list numbered 1 to 8 with a different image
appearing depending one what the user selects.
Thanks
Neil
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options