javascript - different behaviour on page refresh - javascript

I have a really weird problem.
I have a site (running wordpress), and I use jquery roundabout plugin.
When I visit the site with the address bar, the site is displayed fine. When I'm already in the site and I hit refresh - everything is messed up. I checked in both chrome and firefox, and I get the same result. In IE there is no problem.
Also, I noticed that the problem occurs only when doing a soft refresh (F5) and it's ok when doing a hard refresh (Ctrl+F5)
You can check for yourself in my test site
http://50.112.34.111
try to press enter in the address bar a few times - should display ok. try to refresh - and you'll see the problem...

First of all I would try to put the JS includes (<script.../>) in the header AFTER all CSS includes! That might already help. Since the CSS might influence your JS, JS has to know all CSS before it gets loaded.

Related

Pannellum in iFrame suddenly stopped working

I have a simple "360 Tours" page on a client's Opencart website, using an iFrame on an info page. The page opens with an outside view, the visitor can then select other areas to view by clicking links below. The viewer code pannellum.htm and all the panoramic images are hosted on the client's server with the viewer displayed in an iFrame based on Pannellum's examples.
This was trivial to get working and has operated correctly for months but recently stopped working, displaying nothing where the panoramas once were. I tried Chrome, Firefox & Safari under OSX, Windows and an iPad without Joy. However, this morning I noted that my Chromebook still worked perfectly. So, I updated the Chromebook and it too stopped working. Nothing at my end has changed, though I did update to the latest pannellum.htm today to no avail.
A JS function load360() forms a url and loads this into the .src property of the iFrame which is located by id. Originally, the working code looked like this:
let url=...
let frame=document.getElementById("mf-360");
frame.src=url;
frame.contentWindow.location.reload(true);
Searching reveals that the reload is not required and simply assigning a new url to the .src property should be enough to force a refresh of the iFrame. Removing the reload had no effect, and in fact having it there stops the viewer from ever displaying. However, assigning a blank string to .src then the required url like this..
let url=...
let frame=document.getElementById("mf-360");
frame.src='';
frame.src=url;
..seems to work, but only every _second) time load360 is called.
Does anyone have any idea what's going on?? I'm more of an electronics-design/embedded guy and any help here would be most appreciated..
The site is https://www.davidcoils.com - click '360 Tours' at the top.

How to stop page from redirecting to the previous visited page?

The issue i have is that when i click on any page in my menu, it loads and then goes back to the previous page i visited. I contacted my hosting provider and they said there must be some code somewhere inside the website or database. But i know for sure i didnt put any code in there. Does anyone know where i could find this code or where the problem could be?
I already tried changing the permalinks and all, but this didnt work.
I expect the page to just normally load into my browser window without redirecting to the previous page.
URL is: http://www.vandeheg.nl/
From what I can see this is a problem with the JavaScript on the site, as with JS disabled I can access all the pages without issue.
I'd recommend trying with all plugins deactivated, and then if that doesn't solve the issue have a look through your theme code for anything like window.location that might imply a forced JS redirect.

AngularJS - Erroneously Refreshing DOM

I've found a rather complex issue with my angularJS SPA website that I can't seem to find a solution for. When I go to the page for the first time (in chrome incognito mode), everything loads fine. However, when I click on a button to go to another page on my site, the DOM gets reloaded. This is a problem because I have some local values that I need to retain their values. I can't pinpoint an exact area in my code that's causing this to happen. Has anyone else had this problem before? Any help is much appreciated

IE11 wierd behaviour -- JavaScript works only after reloading a page

I have a website prototype https://arcane-beyond-35849.herokuapp.com/
I have a strange bug. In internet explorer v11.
please go to the site and press new button.
You will see this picture...
Then you can reload the page and see this...
I use the jQuery steps wizard.
So I have no idea why the first time everything breaks.
(If you need a code I can provide it just tell me.)
$(".myform").steps({
*some stuff and options
});
Okay I found another weird behavior when you go to the main page and try to click on the menu button in the right top corner nothing happens.
When you reload a page and click menu button again side menu appears.
I simply on document.ready use something like this :
$('.somebutton').click(function(){});
I guess I should provide code and I will do it as soon as get to another laptop. But if take away all business logic The code is as simple as I described.
In google chrome everything works normal.
Can someone help? Seems like my JavaScript code just doesn't execute.
Update:
okay guys Console give me some errors. My IE11 not in English so no point to post exact errors here.
There is something about the content that is loaded over http when I have https.
But it's just a placeholder picture. So I don't know. And when I reload page my JavaScript code works. So this is strange.

Website wont show on IE once I activate scripts. Everything is missing except for the background

So, I've been creating a site based off a template. The site used to work on IE, but I'm afraid that I have made changes since then that causes everything to go haywire. When first visiting the site my grids and alignments are all off and most of the javascript doesnt work. When I activate scripts and ActiveX all of the elements of the site are invisible except for the background. Though, I can still see the source in this instance.
The site (for now) is: http://www.escroft.com/index(main).html
If the site is not displaying when you turn scripts on, you probably have a script error. Open your developer tools with F12, and reload the page; the console should show you what errors you have, and then you're on your way to fixing them.

Categories