I tried:
<a href="{{=URL('vcard','mailVcard',args=node.id)}}" data-toggle="modal"
data-target="#vCardModal"><img
src="{{=URL('static','img/icons/vCard.png')}}" alt="" width="48px"
height="48px" /></a>
<script type="text/javascript">
$("a[data-toggle=modal]").click(function (e) {
target = $(this).attr('data-target')
url = $(this).attr('href')
$(target).load(url);
})
</script>
<div id="vCardModal" class="modal hide fade">
</div> <!-- /modal -->
Which requests the url.
I also tried:
<a onclick={{="web2py_component('%s','#vCardModal')"
%URL('vcard','mailVcard.load',args=node.id)}} data-toggle="modal"
data-target="#vCardModal"><img
src="{{=URL('static','img/icons/vCard.png')}}" alt="" width="48px"
height="48px" /></a>
<div id="vCardModal" class="modal hide fade">
</div> <!-- /modal -->
and:
<script type="text/javascript">
$("a[data-toggle=modal]").click(function (e) {
web2py_component("{{=URL('vcard','mailVcard.load',args=node.id)}}",ajax=True,target='#vCardModal')
})
</script>
<div id="vCardModal" class="modal hide fade">
</div> <!-- /modal -->
which both don't request the url. I don't see what's the difference between
the former and the latter JavaScript.
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.