[Pro] Menu/List selection makes different graphic appear

Hi!

So basically what I’m trying to do is offer a hosting plan. What i want is for the customer to select from a menu what payment option he wants (the 1 month price, 6 month price, etc.). When he does this, I want the selection to be linked to a particular graphic, in this case a button. I already have the button linked to paypal, I just have one button per plan, and I’m trying to figure out how to make a specific button show when it’s related menu option is selected?

Thanks so much for the help!!!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Rollover on the text with Target show/hide layer on the button item.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

One way to do this is with the Protaculous Action. I can’t think of
any good way to do this such that it would work without JavaScript,
but I suppose I could if that became a sticking point.

First, set up each of your buttons as a layer (make sure the Layer
checkbox is ticked in the Inspector when the image is selected on the
page). Then stack them so they are all directly one above the other.
Before you do that, check (and write down) the name of each button.

Now draw a picker on the page, if you haven’t already, and set it to
have the options for each of the buttons. Let’s imagine that you have
an option with the Value ‘monthly’ to coincide with a button named
‘monthlyButton’ in your stack of buttons, and that further you have
followed this rule when creating your other options and buttons. Name
this field (using the third tab from the left in the Inspector while
the picker is selected) paymentPlan. If you want to have a different
name for this field, then be sure to change this name to match below
in the JavaScript.

Apply Protaculous to the page, and click on the top Function Body
button. The first thing is to set up the buttons so only the first one
(monthly) is visible, and all the others are hidden. The next is to
set the picker to “listen” for the onchange event and update the page
according to its current value. Inside the dialog that opened when you
pressed that button, add the following code:

var buttons = $$('#monthlyButton, #quarterlyButton, #annuallyButton');
buttons.invoke('hide').first().show();
$('paymentPicker').observe('change',function(evt){
     buttons.invoke('hide');
     $($F(this) + 'Button').show();
});

Now, click once on your picking list element, and while it’s selected,
choose Item / Extended from the main menu. Make sure the Select tab is
highlighted in the resulting sub-dialog, then click the New button. In
the sub-sub-dialog, enter the following name and value where indicated:

  • Name: id
  • Value: paymentPlan

You have to do that step because Freeway doesn’t properly apply IDs to
any form elements. Just also make sure you haven’t named any other
element on the page paymentPlan, because if you do, the page will be
invalid and this picker won’t work correctly.

Now if you preview in a browser, changing this picker should swap the
buttons in and out.

Important to note – this relies entirely on a very strict naming
convention. Your picker must be named (and ID’d, using Extended)
paymentPlan. Your picker must have three options, the first one must
be ‘monthly’, the second one must be ‘quarterly’, and the last one
must be ‘annually’. Your button images must be named monthlyButton,
quarterlyButton, and annuallyButton using the Title field in the
Inspector. Spelling and case count here. If you get everything exactly
right, it will work. Get any part of it even slightly wrong, and it
won’t.

Walter

On Jul 1, 2011, at 2:01 PM, Themacgenius wrote:

Hi!

So basically what I’m trying to do is offer a hosting plan. What i
want is for the customer to select from a menu what payment option
he wants (the 1 month price, 6 month price, etc.). When he does
this, I want the selection to be linked to a particular graphic, in
this case a button. I already have the button linked to paypal, I
just have one button per plan, and I’m trying to figure out how to
make a specific button show when it’s related menu option is selected?

Thanks so much for the help!!!


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

Thanks, Walter!!! I’ll give this a try tonight, and see how it works!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options