Facebook Canvas JavaScript Links Don't Work - javascript

We are using ASP.NET for our Canvas Page, however none of the link buttons (JavaScript Post Backs) work when using FireFox.
After a bit of investigation it appears that any javascript link i.e. <a href="javascript:..."> will not run.
When viewing the iFrame outside of Facebook the links work as expected.
Bizarrely javascript on an "onclick" event does work correctly.
Facebook Canvas: http://apps.facebook.com/ukflive/test.aspx
Any thoughts on why this is happening, and how to resolve this? Other browsers such as Safari and Chrome do not have this issue.
Many Thanks,Ady

In some versions of firefox i've met same problem but i wasn't able to find out reason of problem since i've seen your question. thank you for this :). In my opinion it is a firefox bug working with iframes, and it is related with security concerns.
i've changed all <a href="javascript:anyJSFunction()"> codes to <a href="javascript:;" onclick="anyJSFunction"> and it works for my application.

Related

Adding target="_blank" causes link to stop working

Up to my elbows in what is surprisingly the most elusive bug I've encountered thus far.
I've got a site I'm working on that has issues with links opening in Safari. The issue is isolated to the target appendage. To be clear, this issue is not that links do not open in a new tab, it's that they don't open at all.
For example, this will open just fine:
blaaaahh link
This, however, will do 'nothing':
blaaaahh link
Note that this is specific to PDF files. Links to any other type of resources work fine, even with the target appendage.
Note note: There is a ton of event tracking happening on this site. And the issue is resolved when JS is disabled. I've excluded all site-specific JS for testing, so that's not the issue. Anyone aware of anything with GTM or HotJar in Safari that could cause this?

Website not working in Firefox/Chrome, but does in IE

There is a website that I must use at work quite a bit and the only browser it works on is Internet Explorer.
I'm presuming this is because the code is outdated/incorrect and includes javascript that only IE is able to read.
This is a problem, because I want to use Firefox or Chrome, they are much better browsers.
I believe the issue is Firefox/Chrome (hereinafter referred to as foam) not being able to recognize the following "onclick" command lines. When I press these buttons, the web page does not change as it should.
<button class="MenuButton" title="Create ICL" value="ADDICL" onclick="PageJump('ICLMain.asp?From=ICLHome')">Create ICL
So.... since this is not my website, I cannot re-write all of this code to fix it. It is a corporate owned underwriter website for creating a certain document.
There must be some sort of extension that enables Firefox/Chrome to read Javascript codes like Internet Explorer so that I can use Firefox/Chrome and still use this website.
Try to use chrome extension ie tab, https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd?hl=es. This extension emulate The ie Explorer.
I'm also facing the same problem(Javascript broke). The solution I found is to just add https:// before the link and reload the page and everything will work fine again.

Omniture / Adobe Analytics tracking breaks external links in Safari

The Omniture tracking code is breaking all external links on our site in desktop and mobile Safari. When we click or tap on any link with an href outside our own domain, Safari won't open the page requested - or it does once, but then not again. Here's a very basic example of the kind of link that breaks:
Test
This is a weird bug that only affects Safari. We know it's the Omniture code because the links start working as soon as we comment out the link to the SiteCatalyst JS file, or when we set the s.trackExternalLinks option in the Omniture config to false.
SiteCatalyst has a linkInternalFilters variable where we set the domain of our site: a function called s.exitLinkHandler uses this. We thought it might be the source of the issue, but even when we redefine it as an empty function our external links are still blocked.
Has anyone else come across this crazy problem? We can work around it for the moment by removing the href attributes of external links and handling clicks callbacks that use window.open, but it's a total pain that normal external links on our site now don't work on iPads, iPhones and desktop Safari.
(We're using version H.25.2.05feb2013 of SiteCatalyst.)
Looks like you'll simply want to update your H code. There are several link tracking issues resolved in later code versions:
http://microsite.omniture.com/t2/help/en_US/sc/appmeasurement/release/index.html#JavaScript_H_code_Legacy
If you're using manual link tracking, you'll also want to slightly modify your implementation to accommodate recent browser updates:
http://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Manual_Link_Tracking_Using_Custom_Link_Code

Youtube iFrame API events not firing on Firefox 14

I'm currently working on embedding a youtube video using the iframe API, what is annoying me is that the events are not firing only on Firefox (I have just tried firefox 14), they work on every other browser (obviously not using browsers from hell like IE7).
The samples from their documentation don't work either, if you grab the piece of code they have under the getting started section of this page and here is the jsfiddle version for your quick view.
The player is displayed on the page, but as I mentioned the events are not working, neither I can use any function from the api, they all throw undefined error.
I appreciate any help.
Ok I found the problem,
It's because of the Firefox Extension HTTPS-Everywhere, which is switching the requests to use https, and since my page is requested using http, that was causing a conflict with the youtube iframe requests.
I believe I should put a warning on my site about using that plugin. Thanks for your help everyone.
I had once a problem with plying events to the iframe and it also apeared only in Firefox.
The answer was to specify the id and name of the iframe to the same value.
Try it - it might work for you as well.

Certain JavaScript doesn't work in IE9 but there is no JS error

I'm doing some maintenance work on somebody else's site and there's an IE 9 problem. They're using what appears to be a Lightbox to an image gallery. When you click on a certain image on the page, the Lightbox appears, but in IE 9, the Lightbox doesn't show up at all. There's no error or anything - it just silently fails - so I'm kind of at a loss as to how to troubleshoot.
I'm not the best at these kinds of problems. Can someone point me in the right direction?
Here's a link to what I'm working on: http://www.aquilacommercial.com/wlproperties/view/1300-Guadalupe
#Jaitsu, I confirmed that this occurs. For me, IE9 begins to open Lightbox and then immediately opens the image on it's own page. All with no errors.
I'm still unsure on IE9's issue but this might help with an alternate solution:
Most Compatible JQuery Lightbox Plugin, Works in All Current Browsers?
Finally, have you upgraded to Lightbox v2.05. Changelog indicates it didn't work on IE9 till 3/18/11. You might need to upgrade some files.
I confirmed that the Lightbox website is using Prototype v1.7. Your site is using Prototype v1.6.0.2.

Categories

Resources