Thanks a lot! 

I will follow your leads. 


Ps- I'm sure, Ohh yes I am, that the designer will later look at this page,
and will ask: 
"could we just fade in the submenu items".

So I'm wondering, just as an ending conversation topic, supposing that we
need to add a fade in/fade out effect between items and subitems, the js
must come in. But it must come in a unobtrusive way.
 
If a request like this arrives, where should I need to start thinking, in
order to apply js on a structure like the one suggested ? Where should js
enter on that case?


Thanks a lot once again,
Márcio






> -----Original Message-----
> From: prototype-scriptaculous@googlegroups.com [mailto:prototype-
> scriptacul...@googlegroups.com] On Behalf Of Alex McAuley
> Sent: terça-feira, 27 de Outubro de 2009 12:14
> To: prototype-scriptaculous@googlegroups.com
> Subject: [Proto-Scripty] Re: resource information - navigation menu
> 
> 
> Its a common problem - one mostly associated with treeviews and
> databases as
> the algorhythms needed to make a dynamic tree without alot of server
> resources are complex..
> 
> If you need the URL to change then you -MUST- change the href as
> javascript
> can only change the fragment identifier in the URL
> (http://www.google.com#some_anchor) <---- the #some_anchor part can
> only be
> changed.
> 
> In the php you can pretty much do anything you want with the multi
> array and
> display wht you need to....
> 
> I would make it a heirachal array something like...
> 
> $array('parent_node'=>'1','child_nodes'=>
> array('node_1'=>'1',
>         'node_2'=>'2',
>         'node_3'=>'3'
> ));
> 
> then you can get to it easily for example with get
> 
> $nodes=$array['parent_node'][$_GET['node_id']['child_nodes']
> 
> foreach($nodes as$key => $val) {
>     echo('Title = '. $key .'Href ='.$val);
> 
> }
> 
> (psudeo and untested but its the concept that matters)...
> 
> I am not sure what kind of array setup you are using but that is how i
> would
> tackle it .... where $array is a static variable included in a config
> file
> for easy use on any page - simply adding values when you need a new Url
> Alex Mcauley
> http://www.thevacancymarket.com
> 
> 
> 
> 
> ----- Original Message -----
> From: "MEM" <tal...@gmail.com>
> To: <prototype-scriptaculous@googlegroups.com>
> Sent: Tuesday, October 27, 2009 11:56 AM
> Subject: [Proto-Scripty] Re: resource information - navigation menu
> 
> 
> 
> Ok... please do not give up on this. :)
> 
> The "thing":
> http://www.nuvemk.com/
> 
> Now, if you click on Agricultura, you will get:
> 
> Three links: Fitofármacos / Adubos / Sementes.
> 
> The other three identities (that will be links as well) that you see
> there:
> "Herbicidas / Insecticidas / Fungicidas" ARE CHILDS of the
> Fitofármacos.
> 
> 
> However, I want them to show ONLY WHEN the user CLICKS on Fitofármacos.
> Right now, I'm retrieving and displaying the full array of parents and
> childs).
> 
> 
> The hard part (I believe), is that, the URL needs to change as well, in
> order to display the list of products related to the element clicked by
> the
> user. So it's more like a "filter navigation" then a menu. If this
> makes
> sense.
> 
> This relation between: php multidimensional array + uri changes +
> onclick
> events + css classes to show/hide + xhtml elements id in order to make
> this
> work, are making me get crazy will all this. :S
> 
> 
> O.o
> Márcio
> 
> 
> 
> 
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: prototype-scriptaculous@googlegroups.com [mailto:prototype-
> > scriptacul...@googlegroups.com] On Behalf Of Alex McAuley
> > Sent: terça-feira, 27 de Outubro de 2009 11:16
> > To: prototype-scriptaculous@googlegroups.com
> > Subject: [Proto-Scripty] Re: resource information - navigation menu
> >
> >
> > Sorry Marcio i am not sure i understand fully what you need ...
> >
> > Do you have an example from a site that maybe you have seen somewhere
> > that i
> > can visualise on?
> >
> >
> > Alex Mcauley
> > http://www.thevacancymarket.com
> >
> >
> > ----- Original Message -----
> > From: "MEM" <tal...@gmail.com>
> > To: <prototype-scriptaculous@googlegroups.com>
> > Sent: Tuesday, October 27, 2009 10:46 AM
> > Subject: [Proto-Scripty] Re: resource information - navigation menu
> >
> >
> >
> > Thanks Alex... well... sometimes, I get some comments that just kills
> > my
> > orientation mood:
> >
> > Here's a reply from a php list:
> >
> > Quoting:
> >
> > "essentially what you are saying is:
> >
> > 1) user is presented with the basic navigation menu
> > 2) user clicks an item and page navigates somewhere else
> > 3) because of the item user clicked in 2) display some extra menu
> items
> >
> > That's not a menu, it's just a navigation bar that changes slightly
> > depending on where you are in the site..."
> >
> > So maybe my focus should not be on the click event but on the url
> > changes?
> >
> >
> > Putting the thinks like this, should I still think on js for this
> job?
> >
> > What do you think?
> >
> >
> > Thanks a lot,
> > Márcio
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: prototype-scriptaculous@googlegroups.com [mailto:prototype-
> > > scriptacul...@googlegroups.com] On Behalf Of Alex McAuley
> > > Sent: terça-feira, 27 de Outubro de 2009 10:09
> > > To: prototype-scriptaculous@googlegroups.com
> > > Subject: [Proto-Scripty] Re: resource information - navigation menu
> > >
> > >
> > > I wrote a quick and dirty "windows style" start menu for an
> > application
> > > the
> > > other day..
> > >
> > > If you want to learn the concepts check out the code at
> > > http://pastie.org/671380
> > >
> > > Some of it is only relevant to my application but thats easy enough
> > to
> > > pick
> > > out...
> > >
> > > Each time somehting in my start menu is hovered (if it has a
> certain
> > > classname) it makes an Ajax Request to my server to get the latest
> > > possible
> > > sub menu's for that menu item (you wont need to do this if your
> > > application
> > > is static) ..
> > >
> > > There is probably a better way to do this but i needed flexability
> > and
> > > i had
> > > not written a menu before so i thought i would have a crack at
> it...
> > It
> > > took
> > > about 15 minutes to write so it isn't all that complicated - if you
> > > need any
> > > explination please ask.
> > >
> > > HTH
> > >
> > > Alex Mcauley
> > > http://www.thevacancymarket.com
> > >
> > >
> > > ----- Original Message -----
> > > From: "MEM" <tal...@gmail.com>
> > > To: <prototype-scriptaculous@googlegroups.com>
> > > Sent: Tuesday, October 27, 2009 9:38 AM
> > > Subject: [Proto-Scripty] resource information - navigation menu
> > >
> > >
> > >
> > > Hello all,
> > >
> > > I'm on my way for building a menu using javascript.
> > >
> > > If I search for js menu on google, I get "23523523 free build now
> > menus
> > > etc..."
> > > But I would like to understand and see, the process involving the
> > > creation
> > > of a js menu that needs to be unobtrusive.
> > >
> > > For this database menu I need to:
> > > Have a menu that, when the user clicks:
> > > a) show the child elements of that clicked parent.
> > > b) change the URL.
> > > I don't mind about reloading.
> > >
> > > The server side part:
> > > 1) Construct an array from a query.
> > > 2) Build a ul/li List based on that array
> > > 3) Print it out to the page.
> > >
> > > The client-side part:
> > > 4) I suppose I should I give to the li and ul some ids, so that we
> > can
> > > show
> > > child elements only when a specific parent is clicked? But we add
> > this
> > > ul/li
> > > ids on the server side code, or on the client-side code?
> > >
> > > 5) Each time the user clicks on a menu item, the URL must change.
> How
> > > to
> > > preserve the menu estates over this url changes?
> > >
> > >
> > > Some questions may not make too much sense for an experimented
> look,
> > > and are
> > > related with my confusion, but what I really like to understand is
> > the
> > > procedures for creating something like this.
> > >
> > > Could I have your help on this?
> > >
> > >
> > > Thanks a lot,
> > > Márcio
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
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