Maybe something like this:
<script>
jQuery(function() {
web2py_component('{{=URL('vcard', 'mailVcard.load', args=node.id)}}',target
='vCardModal');
});
</script>
<a id="vCardModal" href="#vCardModal" data-toggle="modal">
<img src="{{=URL('static','img/icons/vCard.png')}}" alt="" width="48px"
height="48px" />
</a>
<div id="vCardModal" class="modal hide fade"></div> <!-- /modal -->
Anthony
On Saturday, May 18, 2013 3:22:35 AM UTC-4, Annet wrote:
>
> @Derk,
> Thanks for the reference, I built the test app to get a better
> understanding of the way this works,
> it probably solves the form.custom issue I posted here:
> https://groups.google.com/forum/?fromgroups#!topic/web2py/3HoDW6ygCDQ
>
> @Anthony,
> Thanks for your reply.
>
>
>> In that case, you might consider loading the form as an Ajax component.
>
>
> That's what I tried after reading about components in the book (before
> giving the
> none ajax solution a try)
>
> <a href="#vCardModal" data-toggle="modal"><img src="{{=URL('static','img/
> icons/vCard.png')}}" alt="" width="48px" height="48px" /></a>
>
> <div id="vCardModal" class="modal hide fade">
> {{=LOAD('vcard','mailVcard.load', args=node.id, ajax=True)}}
> </div> <!-- /modal -->
>
> As an example I took my implementation of a tab-able timetable, which
> loads the classes of the current day.
> However, this way of coding loads the form before the link has been
> clicked. Which results in a form
> maintaining its state when switching between showing and dismissing the
> modal window. I thought I'd
> solve this adding a reset button:
> reset=INPUT(_id="reset",_class="btn",_type="reset",_value="Reset"),
> but that button does not reset the form.
>
> Is there a way to not load the form until the link has been clicked?
>
>
> Best regards,
>
> Annet
>
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.