Forum Archive - Error with ajax request

Error with ajax request
Nov 11, 2016 4:49 pm by jfc2_98
Hi, I installed Gtranslate with sub-domain URL method. In my webpage, I have ajax scripts that updates dynamically data. You can see here : http://www.pointcourse.com/inscriptions ... reuve=4256, and you can see two ajaxscripts call with Firebug console. When I call the English translation page : http://en.pointcourse.com/inscriptions. ... reuve=4256, you can see that my two ajax scripts are not called and I have a error in my page (see with Firebug console). And so I can translate all text. Why my two AJAX calls are not you launched it in en.poincourse.com ? Thanks for your help ! JFC
Re: Error with ajax request
Nov 13, 2016 4:07 pm by Yana
Hi, I can see the following error No 'Access-Control-Allow-Origin' header is present on the requested resource. Please add the following line to your .htaccess. Header set Access-Control-Allow-Origin "*"
Re: Error with ajax request
Nov 14, 2016 12:37 pm by jfc2_98
Thanks Yana for tour response. I added the line "Header set Access-Control-Allow-Origin "*"" in .htaccess but this is the same thing : My two ajax scripts are not executed on http://en.pointcourse.com/inscriptions. ... reuve=4256 ... :( Thanks
Re: Error with ajax request
Nov 16, 2016 7:51 am by Yana
Hi, Please check our documentation to see how to enable JSON format translation https://gtranslate.io/docs/58-gtranslat ... umentation
Re: Error with ajax request
Nov 19, 2016 9:10 am by jfc2_98
Hello Yana Now is good for the traduction with JSON format : http://en.pointcourse.com/inscriptions_ ... age_edit=1" rel="nofollow" target="_blank But now, it's not possible to edit it ! why ? (with &language_edit=1 option) Thanks JFC
Re: Error with ajax request
Nov 20, 2016 9:46 am by Edvard
Hi, If you wish to edit you can create a custom HTML page with contents you wish to edit. In that case you will be able to open the edit interface for that HTML page and edit. Thanks!
Re: Error with ajax request
Nov 20, 2016 1:30 pm by jfc2_98
I'm sorry but I do not understand your answer. The content of the page called in AJAX is dynamic and comes from information of the database according to the criteria of the parameters of the parent page. So you can not create an HTML page with the data. There is no solution to edit with option "language_edit=1 directly ?
Re: Error with ajax request
Nov 20, 2016 2:04 pm by Edvard
OK, let me give you an example. You have some axaj response in JSON format, you wish to edit some parameter's value in it. For that you can create a new HTML page with that value and access it directly. On that page you can modify the value translation. Hope this makes sense. Thanks!

SIMILAR TOPICS

Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
Error message and URL problemsFeb 6, 2019 11:16 amReplies: 1Post by: Kidbooo
GT doesn't work...error 404 pageJan 28, 2019 5:36 pmReplies: 1Post by: vincenzodinuzzo
Nginx 502 ErrorJan 11, 2019 2:15 pmReplies: 1Post by: mightyfineprint
Error message on click on the widgetJan 6, 2019 9:52 pmReplies: 1Post by: jmric68

Try GTranslate with a free 15 day trial