Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 17. Apr 2024, 01:11

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Bug in ai.js
PostPosted: 10. Jan 2018, 09:14 
Offline

Joined: 10. Jan 2018, 09:10
Posts: 1
This:

function aiProcessMessage(event) {
var jsObject = JSON.parse(event.data);

is giving an error because event.data is already a JSON object and not a JSON string.

So, this fixes the error

function aiProcessMessage(event) {
var jsObject = event.data;


Top
 Profile  
 
 Post subject: Re: Bug in ai.js
PostPosted: 10. Jan 2018, 16:42 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
But who is sending this? My implementation ai_external.js does send a json string. So this does need the json.parse.

Where does this object come from? Is there a different message sent from the iframe?
Can you enable post message debug and check the output in the js console?

Best Michael


Top
 Profile  
 
 Post subject: Re: Bug in ai.js
PostPosted: 10. Jan 2018, 18:01 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
see: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message

There you can see in the Javascript console that this is fine.

So the question is where does this json object come from...

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy