DMXzone Ajax Form Support Product Page

Not a problem

Unable to get custom content to show.

Reported 10 Apr 2013 05:21:16
1
has this problem
10 Apr 2013 05:21:16 AK Tom posted:
I am hoping you can help me figure this out.
I have been following the tutorial for ajax form to get custom content to show, and I have been unable to get it to work.
If I leave it as default (ie dont change targeted or requested) it works fine, but when trying to target a div, the content is not displayed.

I have a very basic implementation here
207.58.151.9/ajax.php

According to firebug, the form is being submitted just fine, and the response is being sent back to the browser, but the #show div is not disappearing, and the #results div is not displaying like it should.
Thanks!

Replies

Replied 10 Apr 2013 07:05:25
10 Apr 2013 07:05:25 Miroslav Zografski replied:
Hello Tom,

You have an invalid targeted id. In your simple test the targeted is set to #show, while the div that you actually want to target has id of #showme.

Regards.
Replied 10 Apr 2013 07:21:12
10 Apr 2013 07:21:12 AK Tom replied:
Oops, that was a typo in my test I uploaded. I have fixed that part, but it still doesnt work.

I appreciate the fast reply, as I am under a bit of a time crunch :-)
Replied 10 Apr 2013 08:19:36
10 Apr 2013 08:19:36 AK Tom replied:
After more testing, and moving things around on the page, it appears that the location in the DOM of the 'Get Response' Div is important. It MUST be inside the ajax form conainer.

The 'Set Target' div can be anywhere on the page, but the 'Get Response div' must be inside the ajax form containing div.

Is there anyway this could be changed so that the 'Get Response' Div could be anywhere on the page? Since it is targeting an ID, which is unique on the page, it seems like it should not need to be inside the ajax form container.

Is this change possible for you to make?
Replied 11 Apr 2013 08:45:43
11 Apr 2013 08:45:43 Miroslav Zografski replied:
Hello Tom,

using your html I've tested the issue and it worked just fine after fixing the typo.

There is no limitation in the place of the targeted div programmed in the extension.

Regards.
Replied 15 Apr 2013 23:08:19
15 Apr 2013 23:08:19 Juan Olarte replied:
Hi, I am having the same problem, I did the tutorial and try different things, but whenever I try to use my on DIV to show the just inserted document it doesn't work. Does anyone know what I can do

Thanks

Juan
Replied 16 Apr 2013 01:04:36
16 Apr 2013 01:04:36 AK Tom replied:
Juan,
I have managed to get it working fine. Post a link to your page, and I will take a look at it if you like.
Tom
Replied 16 Apr 2013 01:25:19
16 Apr 2013 01:25:19 AK Tom replied:
Miro,
I got it to work correctly, but only after you had me downgrade jquery to an older version for lightbox.

It appears that with jquery 1.9.1 (EDITED: downgraded to jquery 1.8.3, and it is still broken) that it IS important where in the DOM that the 'get response' div is.

See my tests below.
Test with jquery 1.9.1 and the (EDITED: downgraded to 1.8.3 'get response' div outside of the ajax form container
(does not work)
207.58.151.9/ajax.php


Test same jquery as above, but moved 'get response' div inside ajax form container.
(works)
207.58.151.9/ajax2.php

However, with jquery 1.7.2, both tests above work, no matter where the response div is
(these are the exact same as the links above, except with the version of jquery different.
(both work)
207.58.151.9/ajax3.php
207.58.151.9/ajax4.php

The only one that does not work, is with jquery 1.9.1 and the get response div outside of the ajax container.

Thanks!
Tom

EDITED to test with jquery 1.8.3 that ships with Ajax Form
Replied 16 Apr 2013 07:25:22
16 Apr 2013 07:25:22 Miroslav Zografski replied:
Hello Tom,

The extensions are tested with up to 1.8.3 Version of jQuery and are made compatible to it. using higher version is at your own risk and is not recommended.

Regards.
Replied 16 Apr 2013 07:26:21
16 Apr 2013 07:26:21 Miroslav Zografski replied:
Juan,

Please, provide a link to a test page.

Regards.
Replied 16 Apr 2013 07:46:07
16 Apr 2013 07:46:07 Juan Olarte replied:
Hi Tom–
Thanks for getting back to me. I am not really sure, as to why I can get it to work. I have tried your examples, and the tutorials and I am not having any luck.

Here are the links:
DMX jquery-latest.pack.js
www.myabilitylink.com/test2.php

jquery 1.7.2
www.myabilitylink.com/test2.php

Also I noticed in your form the id="show" is different after the form is submitted. But when I look at the code i see the same id="show" just with the different information before and after form is submitted.

Thanks

Juan
Replied 16 Apr 2013 08:14:21
16 Apr 2013 08:14:21 Juan Olarte replied:
Hi Miroslav–
Thanks for getting back to me.
Basically what I am trying to do is to have list of cities in the page, then the user can add one using the form, after the form is submitted the div with the city list will get updated with the ajax form.
Here is a link www.myabilitylink.com/test3.php. Any help will much appreciated as I have trying to do this for some time now.

Thanks Juan
Replied 17 Apr 2013 00:28:50
17 Apr 2013 00:28:50 AK Tom replied:
Juan,
You need to do 2 things to get this to work.
Set both your set target and get response to #cityinfo
(I am assuming that div holds a repeat region getting the content from the cities table).

Then you need to either downgrade jquery from the 1.8.3 that ships with ajax form to 1.7.2 or so.
OR
move your the cityinfo div inside the ajax container div.
I can post an example if you need.

Miro,
I edited my earlier, and changed my test to jquery 1.8.3, and it still shows the behavior I mentioned. So something happened in the jquery core between 1.7.2 and 1.8.3 that seems to be causing an issue.

Thanks,
Tom
Replied 17 Apr 2013 08:06:41
17 Apr 2013 08:06:41 Juan Olarte replied:
Hi Tom—
Thanks a lot for the help, as you said all I need to do was to set target and get response to #cityinfo, and it works!!!

Regards
Juan
Replied 17 Apr 2013 10:46:40
17 Apr 2013 10:46:40 Miroslav Zografski replied:
Hello Tom,

Thanks for the info. Will check on this behaviour.

Regards.

Reply to this topic