Redirection to external links fails on Safari - javascript

I am facing this strange issue only on safari.
In my webapp app, I redirect to some links using window.location.href
For all these links a connection lost error is returned from the browser on safari, working fine with chrome and firefox.
And when I retry the link a few times, it also starts to work on Safari.
So for example there is a button A, which onClick has window.location.href to "https://example.net", now when I click any links of this type, on first attempts it fails on safari, never ever occurred on Chrome or Firefox. Also if the whole page is still loading and I click, it works.
And everthing works in local enviroment, but doesn't work on stage and production.
Please help me out on this one, I have tried a lot of combinations like using anchor links tags instead of button, but button was used for a reason. Anyways If anyone has similar issues and know something about, please help me.

Related

Clicking on link does not work on firefox

I use Firefox 36 on Windows 7. I am seeing a strange problem where the product that i work on, javascript suddenly stops working on FF 36. I do not see any errors in the console when it stops working too. For eg: empty drop down list, missing hover icons, unable to click on links, links or button disappearing. The same on IE11 and chrome work fine. Is there a way I can figure out why this is a problem on FF-36?
I was seeing the above problem because I had Firebug turned ON and that disabled javascript on the page. Disabling firebug and refreshing the page enabled the javascript again.

"Error calling method on NPObject" on first page load

since a few days there seems to be a problem with a audio player script (flash + javascript) on one of our pages that NEVER occured before and I changed absolutely nothing in the code (it has worked for a few years now) that could cause this issue.
We bought the audio player script a few years ago, and again, until a few days ago, it worked perfectly.
The error also behaves very strange. Let me explain...:
The page is www.imatunes.de . You can see these small audio players on each article there.
Feel free to check out the code, got nothing to hide there.
My coworkers told me, that suddenly nothing happened if they clicked on the "Play" buttons. Normally, the script should start the flash player, which plays an audio file.
Now comes the "somehow" strange part:
My coworkers are all using Google Chrome. When they open the page in Chrome and click on a "Play" button, the JavaScript console throws the following error:
"Error on calling method on NPObject".
Googling that error says it has to do something with actionscript, cross-domain policies and such. But the error will get stranger...:
I'm using Firefox, and there it works FLAWLESS. But it also works on MY Google Chrome flawless, so it's very hard to debug (that's why I'm here to ask).
My coworkers also tried it on their home PCs, also running Google Chrome and such, and it also doesn't work there.
Now comes the "very" strange part:
When they get this error and reload the page via the browser controls (F5 or the reload button), it still won't work.
But if they browse around the page or just click on the logo in the header (which basically takes them to the home page again), the script magically works.
And on every other page except for the home page, it will work on first try.
As I said before, this started a few days ago - before that, everything worked just fine. And I really didn't change anything in the code.
So regarding the fact that it works after they browse around the page and return to the home page, it somehow seems like some sort of caching error.
I really don't know how I could debug this, or what to do.
Thank your for every possible help in advance!

strange script error with firefox alone

If you open this site in chrome, it loads and runs ok but I tried loading it in firefox 19.0.2 and I keep getting a Script error asking me if I want to continue or stop. After doing some searching around I found the about:config setting, but that doesn't help. I installed firebug and I see an error about "Permission denied to access property 'toString'" but I have no clue as to what it wants or needs. And the weird part is that if you go to another page in the same site like this one it works just fine. I'm clueless as to what it can be, so any help is much appreciated.
Not a duplicate of this, since it happens on one page but not the other and they both run the same exact code. just that one loads a bit more data than the other. More than anything I'm wondering if its the amount of facebook likes on one page?
When you try to hit play button, you will get a JavaScript error in console in both Chrome and Firefox "TypeError: player is undefined". I tried it and the same error appeared in both console logs. It is and error in the page itself.
I opened it in my firefox browser and it works fine. So it may be there is an add-on which did this error. Try to disable your installed add-ons from (firefox --> add-ons) and reload the page again. If it loads fine then you can enable your add-ons one by one to check which one causes this problem.

Window.location intermittently fails to load in IE

I have an aspx page with JS calling window.location.reload(true) to force refresh a page when a function is called.
This appears to work a few times, with the page reloading as expected, but gets to a scenario where the function is called (i.e. alert in the function is visible) but the reload does not occur. I've also tried setting window.location with the same outcome - it works 2 or 3 times then fails.
This does not occur in Firefox (16), but is happening in different versions of IE (7 & 9)
Using Fiddler to monitor the browser traffic, all is as expected when the reload is working, but there is no traffic reported when the reload stops, suggesting the browser is not sending the request to the server? The IE window does go blank with the loading spinner spinning, but eventually IE displays the error page:
Internet Explorer cannot display the webpage
Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.
This appears to lock the browser. Trying to hit another website results in the same output in Fiddler (nothing). Opening a new IE window means I am able to hit the site with no problems.
This was initially causing a problem updating UpdatePanels via __doPostBack so this JS reload of the page was seen as a quick workaround, but this does not seem to be the case.
I would tend to think this is server related, but I have been unable to replicate the issue in Firefox. This does however unfortunately have to work in IE.
Any ideas much appreciated!
JS snippet below (though this is pretty simple stuff)
function ReloadWindow() {
alert(window.location); // Can see this alert, even when page fails to reload
window.location.reload(true);
}

Firefox reload page loop debugging hints?

One of my javascript heavy pages reloads itself endlessly when using a deep link in firefox. (I'm using jquery address plugin btw.)
The page works fine in Chrome and IE, but not in FF. I have tried debugging it using firebug, but the problem is that when the page reloads firebug is reset.
Any hints on how I could debug this besides stepping the code and adding log statements?
You could set Firebug to persist the console so you can see errors on reload.

Categories

Resources