> So, the alert() immediately before web2py_component() gets called, yet no
> ajax call is made?
That's right.
> Do you get a Javascript error in the console?
The JS console displays 5 requests, no errors.
> Are you sure web2py.js is loaded in the page?
Yes, web2py.js is loaded.
I t
So, the alert() immediately before web2py_component() gets called, yet no
ajax call is made? Do you get a Javascript error in the console? Are you
sure web2py.js is loaded in the page?
Anthony
On Sunday, May 19, 2013 2:26:35 AM UTC-4, Annet wrote:
>
>
> Using the developer tools, when you click
> Using the developer tools, when you click the link, do you observe the
> Ajax call being made? If so, does it return the expected response?
>
Using Firefox's developer tools, when I click the link no Ajax all is being
made.
Best regards,
Annet
--
---
You received this message because
>
> If you add the following alerts, do either of them pop up?
>>
>> jQuery(function() {
>> alert('registering click handler'); // should pop up on page load
>> jQuery('#vCardModalLink').click(function() {
>> alert('loading component'); // should pop up when the link is
>> clicked
>>
>
> If you add the following alerts, do either of them pop up?
>
>
> jQuery(function() {
> alert('registering click handler'); // should pop up on page load
> jQuery('#vCardModalLink').click(function() {
> alert('loading component'); // should pop up when the link is clicked
> web2
> Not sure why the Javascript isn't working -- perhaps the Bootstrap modal
>> code is interfering. Maybe use the browser developer tools to see if the
>> click handler is getting registered and called at all.
>>
>
> I used the developer tools, the click handler isn't registered.
>
If you add t
Hi Anthony,
Not sure why the Javascript isn't working -- perhaps the Bootstrap modal
> code is interfering. Maybe use the browser developer tools to see if the
> click handler is getting registered and called at all.
>
I used the developer tools, the click handler isn't registered.
> vcard=r
Not sure why the Javascript isn't working -- perhaps the Bootstrap modal
code is interfering. Maybe use the browser developer tools to see if the
click handler is getting registered and called at all.
>
> vcard=response.render(view='vcard/vcard.vcf',org=org,n=n,fn=fn,jobtitle=jobtitle
Hi Anthony,
Thanks for helping me solve this problem. I gave your solution and
corrections a try, but the request for the url
just isn't made.
I think I give up on solving the problem, there are to many issues I run
into trying to solve it. The closest to a functioning solution
is:
{{=LO
> %URL('vcard','mailVcard.load',args=node.id)}} data-toggle="modal"
> data-target="#vCardModal"> src="{{=URL('static','img/icons/vCard.png')}}" alt="" width="48px"
> height="48px" />
>
In the above, the HTML doesn't include any quotes around the onclick string.
>
> $("a[data-toggle=modal]
Maybe something like this:
jQuery(function() {
web2py_component('{{=URL('vcard', 'mailVcard.load', args=node.id)}}',target
='vCardModal');
});
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
I tried:
$("a[data-toggle=modal]").click(function (e) {
target = $(this).attr('data-target')
url = $(this).attr('href')
$(target).load(url);
})
Which requests the url.
I also tried:
and:
$("a[data-toggle=modal]").click(function (e) {
web2py_component("{{=URL('vcard','mai
@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 c
Assuming you don't want the whole page to reload on form submission, you
should do an Ajax post. In that case, you might consider loading the form
as an Ajax component. Otherwise, you'll have to explicitly set the action
of the form to the URL where you want it to post. By default, the action is
Take a look here...
http://www.web2py.com/book/default/chapter/11#Ajax-form-submission
On Friday, May 17, 2013 11:21:38 AM UTC-7, Annet wrote:
>
> Hi Derek,
>
> Thanks for you reply.
>
> The key is, you want to submit via ajax, and make sure you do a 'return
>> false'. If there is an error in
Hi Derek,
Thanks for you reply.
The key is, you want to submit via ajax, and make sure you do a 'return
> false'. If there is an error in your javascript, you may see the post
> getting sent to the current url or the action setting of the form.
>
At the moment I have a SQLFORM.factory() form
Should be fine to have the form in a modal window. I do it on a lot of
websites.
The key is, you want to submit via ajax, and make sure you do a 'return
false'. If there is an error in your javascript, you may see the post
getting sent to the current url or the action setting of the form.
On Fr
Hi Anthony,
My mistake :-(
The problem is that the form is posted to
http://127.0.0.1:8000/init/vcard/index/6 and not to
http://127.0.0.1:8000/init/vcard/mailVcard/6
so the index function instead of the mailVcard function and therefore the
form isn't being validated and processed.
Maybe it i
What's the problem with the post? The # isn't sent to the server.
On Friday, May 17, 2013 11:16:56 AM UTC-4, Annet wrote:
>
>
> I have this url:
>
> http://127.0.0.1:8000/init/vcard/index/6
>
> In the view I have a link:
>
> data-target="#vCardModal" >Attach to mail
>
> When I click the link, Fir
19 matches
Mail list logo