Error with ajax request

Popular automatic website translation tool

Error with ajax request

Postby jfc2_98 » Fri Nov 11, 2016 8:49 pm

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
jfc2_98
 
Posts: 6
Joined: Fri Nov 11, 2016 8:36 pm

Re: Error with ajax request

Postby Yana » Sun Nov 13, 2016 8:07 pm

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 "*"
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4547
Joined: Thu Jan 12, 2012 6:21 pm

Re: Error with ajax request

Postby jfc2_98 » Mon Nov 14, 2016 4:37 pm

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
jfc2_98
 
Posts: 6
Joined: Fri Nov 11, 2016 8:36 pm

Re: Error with ajax request

Postby Yana » Wed Nov 16, 2016 11:51 am

Hi,
Please check our documentation to see how to enable JSON format translation
https://gtranslate.io/docs/58-gtranslat ... umentation
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4547
Joined: Thu Jan 12, 2012 6:21 pm

Re: Error with ajax request

Postby jfc2_98 » Sat Nov 19, 2016 1:10 pm

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
jfc2_98
 
Posts: 6
Joined: Fri Nov 11, 2016 8:36 pm

Re: Error with ajax request

Postby Edvard » Sun Nov 20, 2016 1:46 pm

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!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4403
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Error with ajax request

Postby jfc2_98 » Sun Nov 20, 2016 5:30 pm

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 ?
jfc2_98
 
Posts: 6
Joined: Fri Nov 11, 2016 8:36 pm

Re: Error with ajax request

Postby Edvard » Sun Nov 20, 2016 6:04 pm

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!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4403
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests