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 25. Nov 2024, 07:14

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  [ 9 posts ] 
Author Message
PostPosted: 29. Jan 2018, 01:04 
Offline

Joined: 29. Jan 2018, 00:58
Posts: 5
Hello Michael,

I need some help with this issue.

We spoke a little on codecanyon.net, but I guess is better here.

so far I made the .js, and I'm loading it in the iframe with the updateCount().

the code i put is: var counter = 0; function updateCount() { counter++; if (counter > 0) { // close iframe; } }


is set to > 0.

Why do you think is not working?

Can't count this event?


Attachments:
test.PNG
test.PNG [ 117.81 KiB | Viewed 4108 times ]
Top
 Profile  
 
PostPosted: 29. Jan 2018, 10:42 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You have of course to add code to close the iframe!

See what I have posted on code canyon how to close it!
I only posted how it could be done. Not 100% perfect Javascript you only need to copy and paste!

Best, Michael


Top
 Profile  
 
PostPosted: 29. Jan 2018, 12:00 
Offline

Joined: 29. Jan 2018, 00:58
Posts: 5
Hi,

Sorry for the mess.

So, what can i do :)


Top
 Profile  
 
PostPosted: 29. Jan 2018, 12:09 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
check where you have added the Javascript. I think you wrote on codecanyon you add it to the iframe! But this is wrong. It needs to go to the parent!

Best, Michael


Top
 Profile  
 
PostPosted: 29. Jan 2018, 12:28 
Offline

Joined: 29. Jan 2018, 00:58
Posts: 5
Code:
SyntaxError: missing } in compound statement
custom_closeit.js:1:62
note: { opened at line 1, column 61
custom_closeit.js:1:61
unreachable code after return statement
[Learn More]
js:66:1307
ReferenceError: updateCount is not defined
[Learn More]



the code we use is

Code:
var counter = 0; function updateCount() { counter++; if (counter > 10) { // close iframe; } }


Top
 Profile  
 
PostPosted: 29. Jan 2018, 13:29 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You need to write valid Javascript. As I said. I only have given you an example. The returns were removed by codecanyon...

Code:
var counter = 0;
function updateCount() {
  counter++;
  if (counter > 10) {
   alert("close the iframe here!");
   jQuery("#id-of-your-iframe").hide();
  }
}


here you need to add the id of your iframe you have set in your shortcode.

Best, Michael


Top
 Profile  
 
PostPosted: 29. Jan 2018, 14:44 
Offline

Joined: 29. Jan 2018, 00:58
Posts: 5
Code:
var counter = 0;
function updateCount() {
  counter++;
  if (counter > 10) {
   alert("close the iframe here!");
   jQuery("#iframe1").hide();
  }
}



That's the code, no more errors. It just not closing.


Top
 Profile  
 
PostPosted: 30. Jan 2018, 00:03 
Offline

Joined: 29. Jan 2018, 00:58
Posts: 5
Btw, Thank you, Michael!

Great support from this guy!


Top
 Profile  
 
PostPosted: 1. Feb 2018, 00:05 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Glad I could help...


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 26 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