[Pro] Radio Button Choices & Actions

I need to set up radio button choices that determine a monthly or annual choice of subscription - then I need the cart to populate with that choice upon action button (i.e, add to cart, or buy, etc.)

We use a third party cart provider and embed code from them based on the items we put in. So I have items built for the monthly and annual choices and subsequent add to cart code.

Need help incorporating that into the radio buttons.

THANKS!
D


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

Can you post (or better, Gist) the code they sent you for the monthly
and annual choices? There may be a way to do this using the radio
button natively. But if not, anything at all is possible with
JavaScript. (It’s like Neo said – “Guns. Lots of guns.”)

Walter

On Sep 2, 2011, at 12:20 AM, DM wrote:

I need to set up radio button choices that determine a monthly or
annual choice of subscription - then I need the cart to populate
with that choice upon action button (i.e, add to cart, or buy, etc.)

We use a third party cart provider and embed code from them based on
the items we put in. So I have items built for the monthly and
annual choices and subsequent add to cart code.

Need help incorporating that into the radio buttons.

THANKS!
D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
List Options | FreewayTalk


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

Thanks Walter…

We build the item and use a generated ‘add to cart’ embed… http://…
and a an external hyperlink.

Currently I have buttons/text… which can work, but the radio buttons
would be much slicker.

If it requires JavaScript… I may have to hire a ‘gun’. :slight_smile:

THANKS!!!

On 9/2/11 8:40 AM, “Walter Lee Davis” email@hidden wrote:

Can you post (or better, Gist) the code they sent you for the monthly
and annual choices? There may be a way to do this using the radio
button natively. But if not, anything at all is possible with
JavaScript. (It’s like Neo said – “Guns. Lots of guns.”)

Walter

On Sep 2, 2011, at 12:20 AM, DM wrote:

I need to set up radio button choices that determine a monthly or
annual choice of subscription - then I need the cart to populate
with that choice upon action button (i.e, add to cart, or buy, etc.)

We use a third party cart provider and embed code from them based on
the items we put in. So I have items built for the monthly and
annual choices and subsequent add to cart code.

Need help incorporating that into the radio buttons.

THANKS!
D


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


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

Here’s a very simple example of what I mean for you to do:

http://scripty.walterdavisstudio.com/radio_chooser.html

This was hand-coded, but to construct it in Freeway you would do the
following:

Draw an HTML box where your radio buttons and the links to the buy now
buttons would go. Double-click inside it and add your first radio
button as an inline element. Click once on the radio button so the
Inspector changes its title to “Radio Button”. In the third Inspector
tab from the left, set the Name attribute to chosenProduct, and set
the Value attribute to a unique (nick)name for the product itself.
This must follow the rules for constructing HTML ID attributes: first
character must be an alphabetical (roman) character, it must not
contain any spaces or any punctuation besides an underscore, and it
must be absolutely unique on the page. The reason you have to jump
through those rules is because I’m going to have you use that value to
set the ID of the element you want to reveal when the radio button is
clicked. Double-click inside the HTML box again (to the right of the
radio button) and insert the label text for that button. Now repeat
this process for each of the options.

Next, after all the radio buttons are done, get your text cursor
flashing on the next line below all of the radio buttons and choose
Insert / HTML Item from the main menu. You will see a 100px square box
inline within the parent HTML box. Click once on it, and you can
change its dimensions so it fills the width of the space, or whatever
else you like. While it is still selected, choose Item / Extended from
the main menu. Make sure the div style tab is selected, then press
New. In the resulting sub-dialog, enter Name: display and Value: none.
Okay out of the stack of dialogs. Next, double-click inside the inline
box, and enter the text and link to your buy now button. Once you have
the first box done like this, you can click elsewhere, then single-
click on the inline box again to select it (handles showing) and copy.
Then double-click next to it inside the parent HTML box and paste as
many times as you have alternate products. Change the content of these
boxes to suit your alternates.

Go back over the inline boxes you just entered, and change the Title
attribute in the Inspector to match the Value you set for each of the
corresponding radio buttons. (Case-sensitive!!!)

Now it’s time to add the JavaScript. (Which is comparatively simple.)
Apply the Protaculous Action to the page, and choose prototype-packed
from the library picker. Click on the top Function Body button and
enter the following:

document.observe('click',function(evt){
	var elm;
	if(elm = evt.findElement('input[name="chosenProduct"]')){
		elm.up('div').select('div').invoke('hide');
		$($F(elm)).show();
	}
});

That little bit of code wraps up the show. Whenever a radio button in
the chosenProduct group is clicked, all of the inline DIV boxes (with
the buy now links) will be hidden, and the one box that corresponds
with the clicked radio button will appear.

Walter

On Sep 2, 2011, at 10:32 AM, Darlene Miller wrote:

Thanks Walter…

We build the item and use a generated ‘add to cart’ embed…
http://…
and a an external hyperlink.

Currently I have buttons/text… which can work, but the radio buttons
would be much slicker.

If it requires JavaScript… I may have to hire a ‘gun’. :slight_smile:

THANKS!!!

On 9/2/11 8:40 AM, “Walter Lee Davis” email@hidden wrote:

Can you post (or better, Gist) the code they sent you for the monthly
and annual choices? There may be a way to do this using the radio
button natively. But if not, anything at all is possible with
JavaScript. (It’s like Neo said – “Guns. Lots of guns.”)

Walter

On Sep 2, 2011, at 12:20 AM, DM wrote:

I need to set up radio button choices that determine a monthly or
annual choice of subscription - then I need the cart to populate
with that choice upon action button (i.e, add to cart, or buy, etc.)

We use a third party cart provider and embed code from them based on
the items we put in. So I have items built for the monthly and
annual choices and subsequent add to cart code.

Need help incorporating that into the radio buttons.

THANKS!
D


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


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