Hi Avram,

I will ask another question, why couldn't you do it??
means, creating an event for onchange on the list box, and when
received launch appropriate toggle effect !

here is the code you can test and adapt tou your need.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">
<head>
  <title>test</title>
  <script src="prototype.js" type="text/javascript"></script>
  <script src="scriptaculous.js" type="text/javascript"></script>
  <style type="text/css">
    .gdiv{
      float:right;
      width:200px;
      background-color:green;
      margin-right:50px;
      overflow:hidden;
    }
  </style>
</head>
<body>

<select id="mySelectBox">
  <option>none</option>
  <option>square</option>
  <option>circle</option>
  <option>triangle</option>
</select>
<div id="square" class="gdiv" style="display:none;">
  <div>
    square square square square square square square square square
square square square square square square square
    square square square square square square square square square
square square square square square square square
    square square square square square square square square square
square square square square square square square
    square square square square square square square square square
square square square square square square square
  </div>
</div>
<div id="circle" class="gdiv" style="display:none;">
  <div>
   circle circle circle circle circle circle circle circle circle
circle circle circle circle circle circle circle
   circle circle circle circle circle circle circle circle circle
circle circle circle circle circle circle circle
   circle circle circle circle circle circle circle circle circle
circle circle circle circle circle circle circle
   circle circle circle circle circle circle circle circle circle
circle circle circle circle circle circle circle
  </div>
</div>
<div id="triangle" class="gdiv" style="display:none;">
  <div>
   triangle triangle triangle triangle triangle triangle triangle
triangle triangle triangle triangle triangle
   triangle triangle triangle triangle triangle triangle triangle
triangle triangle triangle triangle triangle
   triangle triangle triangle triangle triangle triangle triangle
triangle triangle triangle triangle triangle
   triangle triangle triangle triangle triangle triangle triangle
triangle triangle triangle triangle triangle
  </div>
</div>

<script>
lastToggleDown=false;
$('mySelectBox').observe('change',function(event){
    if(this.value=='none') return false;
    Effect.toggle(this.value,'blind');
    if(lastToggleDown) Effect.toggle(lastToggleDown,'blind');
    lastToggleDown=this.value;
    return true;
})
</script>
</body>
</html>

--
david

On 9 sep, 13:37, Avram <abas...@mitre.org> wrote:
> For example:  There are three items in the HTML list box: Square,
> Circle, and Triangle.  Depending on which of the items you click, a
> different Effect.toggle response displays.
>
> By the way, my first name is Avram.  Baskin is my last name.
>
> On Sep 8, 2:46 am, david <david.brill...@gmail.com> wrote:
>
> > Hi Baskin,
>
> > Do you mean clicking an HTML list element to launch an Effect.toggle
> > on an HTML element, or do you try to apply the Effect.toggle on the
> > HTML list box element which is no possible ?
>
> > --
> > david
>
> > On 3 sep, 18:23, "Baskin, Avram S." <abas...@mitre.org> wrote:
>
> > > Can I use Effect.toggle in an HTML list box?  I want the toggle effect to 
> > > display when an item in the list box is clicked.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to