You'll need the links to trigger Ajax requests. web2py includes some relevant built-in functionality for this -- see the documentation for the A() helper: http://web2py.com/books/default/chapter/29/05/the-views#A. You can use either (1) the "callback" and "target" arguments or (2) the "cid" argument in conjunction with an Ajax component <http://web2py.com/books/default/chapter/29/12/components-and-plugins#Components--LOAD-and-Ajax> .
Anthony On Monday, January 8, 2018 at 3:51:35 AM UTC-5, mostwanted wrote: > > My task is very simple but i do not know how carry it out > I have 2 DIVs namely *#names* and *#details*, there is a list of names in > link format in DIV *#names*, what I want is that when i click on any of > these links i want the rest of that link's details to be displayed in DIV > *#details* in the same page without having to redirect to another page, > how can i achieve this??? > > This is my code: > {{extend 'layout.html'}} > <style> > .person > { > float: left; > border: solid 1px black; > width: 300px; > #height: 100px; > overflow: hidden; > } > > #details > { > height: 100px; > margin-left: 5px; > } > </style> > <h1> > PERSONAL DETAILS > </h1> > <div id="names" class="person"> > <h4> > NAMES > </h4> > <hr /> > {{for names in names:}} > {{=A(names.name,_href=URL(args=names.id))}} > <hr /> > {{pass}} > </div> > <div id="details" class="person"> > <h4> > DETAILS > </h4> > <hr /> > > </div> > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.