scriptaculous multiple effects on multiple forms

Hi everyone just a quickie
I am using the scriptaculous effects on a form and I am wondering if there is a way to affect two deferent items with the same button.
So for example button 1 allows a div with certain “form choices” to appear but I want the same button to make other form elements containing in another div disappear
I hope that makes sense
I am just trying to show relevant form items depending on choices the user makes
it would also be nice if I could combine not only slide down but also appear as well

all the best max


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

Not using the Softpress Actions, but you can do this quite easily with
Protaculous’s Observer Action. You apply it to the button (whatever
that might be) on your page, and then in the Actions interface, set up
the function you want to fire when it is clicked or moused over or
whatever.

This will require you to know the name (ID) of the objects you want to
affect, and to write a little bit of JavaScript by hand. Here’s an
example, where you want one click to cause one DIV (item2) to appear,
while item3 disappears:

$('item2').slide_down({duration:0.4});
$('item3').slide_up({duration:0.4});

Unfortunately, I don’t know if you are going to be able to make
slide_down and appear work together, unless you go to the trouble to
make a nested structure, and apply the appear to the inner-most
element and the slide_down to the outer element. This is because they
both need to do different things with respect to HTML structure, and I
don’t know if they can both be doing that at the same time.

Walter

On Nov 27, 2009, at 12:52 PM, max wrote:

Hi everyone just a quickie
I am using the scriptaculous effects on a form and I am wondering if
there is a way to affect two deferent items with the same button.
So for example button 1 allows a div with certain “form choices”
to appear but I want the same button to make other form elements
containing in another div disappear
I hope that makes sense
I am just trying to show relevant form items depending on choices
the user makes
it would also be nice if I could combine not only slide down but
also appear as well

all the best max


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