Thanks, Kjell!
On 3월12일, 오전12시23분, "Kjell Bublitz" <[EMAIL PROTECTED]> wrote:
> Give the "view" divs a class... lets say "view"
> <div id="view##" class="view">
>
> Then you can go like this:
> $$('.view').invoke('hide');
>
> thats it :)
>
> On 3/11/07, skyblueink <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > //index.thtml
>
> > <div id="faq"></div>
> > <?php echo $ajax->link('FAQ/HELP', '/books/faq', array('update' =>
> > 'faq')); ?>
>
> > <?php
> > for ($i = 0; $i < 10; $i++){
> > $view = 'view' . $i;
> > echo "<div id=$view></div>";
> > options = array(
> > 'update' => "$view",
> > 'url' => "/books/lister/?id=$i,
> > 'type' => 'asynchronous',
> > 'loading' => "Element.hide($view);",
> > 'complete' => "Effect.Appear($view);"
> > );
> > echo $javascript->event('window','load',$ajax-
> > >remoteFunction($options),false);
> > }
> > ?>
>
> > The index.thtml will show you 50 <div>s when loaded, that is
> > <div id="view0"> .....</div>
> > <div id="view1"> .....</div>
> > <div id="view2"> .....</div>
> > .....
> > <div id="view49"> .....</div>.
>
> > When the 'FAQ/HELP' button is clicked, <div id="faq"> .....</div> will
> > be displayed on the top, so that we can see
> > <div id="faq"> .....</div>
> > <div id="view0"> .....</div>
> > <div id="view1"> .....</div>
> > <div id="view2"> .....</div>
> > .....
> > <div id="view49"> .....</div>.
>
> > But what I want to do is to hide all <div>s except for <div id="faq">
> > when 'FAQ/HELP' button is clicked so that we can see only
> > <div id="faq"> .....</div>.
>
> > I guess adding something like 'loading' =>
> > "Element.hide($view0);Element.hide($view0);....;Element.hide($view49);"
> > into the option array could do it. But there are too many <div>s to
> > hide, and there could be easier way of doing this.
>
> --
> Regards, Kjellwww.m3nt0r.de- 따온 텍스트 숨기기 -
>
> - 따온 텍스트 보기 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---