Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
Help me close my iframe :) https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4523 |
Page 1 of 1 |
Author: | zserban [ 29. Jan 2018, 01:04 ] | ||
Post subject: | Help me close my iframe :) | ||
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?
|
Author: | TinyWebGallery [ 29. Jan 2018, 10:42 ] |
Post subject: | Re: Help me close my iframe :) |
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 |
Author: | zserban [ 29. Jan 2018, 12:00 ] |
Post subject: | Re: Help me close my iframe :) |
Hi, Sorry for the mess. So, what can i do |
Author: | TinyWebGallery [ 29. Jan 2018, 12:09 ] |
Post subject: | Re: Help me close my iframe :) |
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 |
Author: | zserban [ 29. Jan 2018, 12:28 ] |
Post subject: | Re: Help me close my iframe :) |
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; } }
|
Author: | TinyWebGallery [ 29. Jan 2018, 13:29 ] |
Post subject: | Re: Help me close my iframe :) |
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 |
Author: | zserban [ 29. Jan 2018, 14:44 ] |
Post subject: | Re: Help me close my iframe :) |
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. |
Author: | zserban [ 30. Jan 2018, 00:03 ] |
Post subject: | Re: Help me close my iframe :) |
Btw, Thank you, Michael! Great support from this guy! |
Author: | TinyWebGallery [ 1. Feb 2018, 00:05 ] |
Post subject: | Re: Help me close my iframe :) |
Glad I could help... |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |