Something strange... Slideshow error

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Something strange... Slideshow error

Post by alex4orly »

Please visit this site : https://squadron-125.org.il/
Yes, it is in Hebrew (Right to Left), but you don't need to understand Hebrew to see the problem

The site is sitting inside a master frame
The master frame has at the bottom - within a layout grid a slide show object
When you visit the site, the slide show is designed to start scrolling the pictures - after waiting a bit, but:

1) The slideshow does NOT start
2) Using Chrome, hit F12 - it shows an error

If however you click the 4th or the 6th button (counting from the right) - the slideshow starts moving and continues moving on whatever other page you maybe, including the first home page... Also, hitting the F12 - the error is gone...

I have all the pages inside the master frame, the master frame is the one with the slideshow in it...

Any suggestions?
Thanks
User avatar
Pablo
 
Posts: 21708
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something strange... Slideshow error

Post by Pablo »

You have added the following script, which causes the error::

Code: Select all

<script>
function LogVisitors()
{
   //if (!sessionStorage.previouslyVisited) 
   //{
   //   $(document).ready(function()
   //   {
         $('#insert-file').load('https://www.squadron-125.org.il/visitors.php');
   //   });
   //   sessionStorage.previouslyVisited = true;
   //}
}
</script>
Related info:
https://en.wikipedia.org/wiki/Same-origin_policy
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Something strange... Slideshow error

Post by alex4orly »

THis is the script that I used in my other post.
It was there all the time, I just inserted it into that function to be called in the OnLoad

It was not executed and hence my visitors were not recorded, that's why I asked my earlier question.
The initial setup was like this, but it was NOT getting into the if() statement, that's why I asked if that was deprecated?

<script>

if (!sessionStorage.previouslyVisited)
{
$(document).ready(function()
{
$('#insert-file').load('https://www.squadron-125.org.il/visitors.php');
});
sessionStorage.previouslyVisited = true;
}

</script>
User avatar
Pablo
 
Posts: 21708
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something strange... Slideshow error

Post by Pablo »

Please read:
https://api.jquery.com/load/
Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, port, or protocol.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Something strange... Slideshow error

Post by alex4orly »

Sorry, I am a bit confused - I don't have any Ajax in this function

So?

Thanks again
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Something strange... Slideshow error

Post by alex4orly »

Also, what if, instead of having the PHP script in an external seprate file,
I insert the script into the calling page and eliminate the JQuery call

Is that not an option?

Cheers
User avatar
Pablo
 
Posts: 21708
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something strange... Slideshow error

Post by Pablo »

Sorry, I am a bit confused - I don't have any Ajax in this function
Yes, you do. 'Load' uses Ajax.

Note that this is unrelated to WWB.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Something strange... Slideshow error

Post by alex4orly »

OK, thanks again
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Something strange... Slideshow error

Post by alex4orly »

Well, I resolved it in another way, Please visit : https://squadron-125.org.il/

1) The slideshow starts after a few secends as intended
2) There is no longer any error with F12
3) The visit is recorded in the log file

Here is what I did

1) The index file for the site is now - index.php
2) This file has in it the script for the visit.
3) At the end - it redirect the visitor to frontpage.html - the home page
4) Once the home page loads, the slideshow starts
5) This also ensures that the visitor's visit is recorded only one per visit, other than for those who get out from a page and go back to the website, but those are minirity.

I published it here, just in case somone else has that problem

I am still curious - how did it work for the past 2 years, as it was, without any errors...

Thanks again
User avatar
Pablo
 
Posts: 21708
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something strange... Slideshow error

Post by Pablo »

I am still curious - how did it work for the past 2 years, as it was, without any errors...
The browser may have been updated the way it processes ajax calls.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Something strange... Slideshow error

Post by alex4orly »

Probably, that's the only explanation

Thanks again
Post Reply