On Wednesday, October 26, 2011 11:58:38 AM UTC-4, annet wrote:
>
> This:
>
> > {{=LOAD('locator','imagetext.load',args=company.id,ajax=True,target='component')}}
> >
>
>
> so, without the <div id="component"></div>, results in weird
> behaviour. When I first visit the page, the div just displays
> Loading...,
It sounds like the ajax call isn't working -- maybe use the browser
developer tools to check the ajax request.
> when I click the lesrooster link, the image link and the
> text display as is:
>
> image:link: imagename.png
> text:text: <h4>Texttextext</h4> ...
>
Are you talking about the timetable link? How is that returning the
imagetext results?
Also, below you noted that visiting the imagetext.load URL directly yields
that same content, so it looks like the problem is the imagetext.load view
isn't returning what you want, so you'll have to debug that function and
view.
> I am stuck getting the image and text bit to work.
>
> When I put a imagetext link on the page:
>
> {{=A('Imagetext',callback=URL('imagetext',args=[company.id]),target='component')}}
>
>
>
> ... and put these back in the view: <div id="component"></div>
> The business card is being displayed correctly. But I cannot have
> visitors click a link to display the image and text.
>
If you're using components, rather than using the callback/target arguments
to A(), use the regular _href argument and the cid argument -- that will
load the _href as a component into the div identified by cid (make sure the
URL uses the .load extension if you've got a .load view for timetable).
See
https://docs.google.com/spreadsheet/ccc?key=0Ajy6-Ewiiuo6dGlqckdOUnB5Yl9OSmd0bV9fN0lvSlE.
The initial LOAD should automatically load the imagetext, and clicking the
link should replace that with the timetable component.
If you're still having trouble, I suggest you post a minimal application
that reproduces your problem.
Anthony