Hyperlink not clickable on Internet Explorer if use Url.Action - asp.net-mvc

I used the mvc actionlink to get the url. It is working fine in chrome. But in IE it is not even clicking. i used the following code to navigate the page.
<a href="#Url.Action("GetHelpDocuments", "Document")">
<span class="navsprite helplink"></span>
<span>Help</span>
I don't find any error in my above code. But please give alternate solution for this.

I used localtion.href to get the actual location href
<a href="#Url.Action("GetHelpDocuments", "Document")" onclick='location.href = this.getAttribute("href")'>
<span class="navsprite helplink" ></span>
<span>Help</span>

Related

SnipCart site: "$localize" showing up in Google search result snippet

I have customized my SnipCart e-commerce site following the customization documentation:
<div hidden id="snipcart" data-api-key="MY_KEY">
<address-fields>
<div>
<div class="snipcart-form__row">
<div class="snipcart-form__field snipcart-form__cell--large">
<snipcart-label class="snipcart__font--tiny" for="address1">
{{ $localize('address_form.address1') }}
</snipcart-label>
However, now I see $localize showing up in Google search results instead of the English text.
Google Search Console shows that the SnipCart .js resource (.css too) is blocked because of cdn.snipcart.com/robots.txt (which is configured to not allow crawling of anything). This seems to be the problem.
What is the proper way to fix this?
Answering my own question in case someone else stumbles into this.
You can prevent certain content from showing up in the snippet with the data no-snippet directive, for example:
<span data-nosnippet>Don't show me</span>
Reference:
https://developers.google.com/search/docs/advanced/crawling/special-tags#data-nosnippet

ioArgs in Dojo 1.10, dojox DialogSimple

Got myself a bit of a problem (only occurring in Tomcat 8.5, but I'll need to handle it)...
I'm trying to open up a dojox.widget.DialogSimple, using an href, that has a long url/data string. Setting the HREF on instantiation causes it to fail as a malformed URL, because it's too long. So, I want to be able to do it as an xhrPost. Is there a way to set this up using the ioArgs property? I haven't been able to find any documentation giving examples of this.
You are correct. An over-long URL string for an HTTP "GET" can cause problems: Web Services: maximum length of HTTP GET request?. In general, the solution is to do a "POST" instead.
Would this solution work for you?
Dojo - how to submit data using a Dialog form
<div dojotype="dijit.Dialog" id="subscription" title="subscription form" execute="alert('Transmitted');">
<form action="PATH_TO_PHP_PAGE" method="POST">
<!--input widgets-->
<!--submit button widgets-->
</form>
</div>

Twitter share button not using custom url or text

I have a link like so
= link_to "https://twitter.com/share", class: "twitter-share-button", data: { url: "https://google.com", text: hack.body, via: "GhettoLifeHack_", hashtags: "ghettolifehack" } do
= image_tag "Tweet", alt: "Social Twitter tweet button"
and no matter how much I change the data-url value, the pre-tweet confirmation page always prepopulates the tweet form field with the url of the referring page, not the one I specified. It also ignores my custom data-text as well.
Why is this happening?
I also have this minified script
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
that I got from here https://about.twitter.com/resources/buttons#tweet
Removing that script doesn't seem to change anything.
edit: upon trying using :'data-url' attributes directly, the output html is the same.
I am testing hardcoded strings and dynamically generated urls at the same time. The first is the dynamic one.
<a class="twitter-share-button" href="https://twitter.com/share" data-via="GhettoLifeHack_" data-url="http://localhost:3000/hacks/1" data-text="asdf comment body" data-hashtags="ghettolifehack">
<img src="/images/Tweet" alt="Tweet" title=""></img>
</a>
The second is the hard coded strings
<a class="twitter-share-button" href="https://twitter.com/share" data-via="GhettoLifeHack_" data-url="httpL//google.com" data-text="custom text" data-hashtags="ghettolifehack">
<img src="/images/Tweet" alt="Tweet" title=""></img>
</a>
I've tested on development and in production. Both have the same behavior of pre-populating the tweet form with the referring url, rather than the specified url and text.
This works in Chrome for me but not in Firefox 32
The code provided by you is perfectly fine and should work as expected.
Many site issues can be caused by corrupt cookies or cache. Try to clear both cookies and the cache. I would suggest you to look into the following link to see why it is not working in firefox
The issue was specific to firefox browser. I'm not sure what addon or setting is causing the conflicts, but it is working perfectly find in chrome, including the popup window.

ng-href link not followed on Firefox

I'm using ng-href which seems to produce the correct results, and the correct behaviour on Chrome but not on Firefox.
on the page www.mydomian.com/clubs/ in my rails app i have the Haml
%a{'ng-href' => '\players\{{player.id}}'} {{player.name}}
when run this produces this html
<a ng-href="\players\14208" class="ng-binding" href="\players\14208">Dylan Robertson</a>
when I use Chrome and click on this link I'm taken to
www.mydomian.com/players/14208
however on firefox when I click on this same link I'm taken to
www.mydomian.com/clubs/%5Cplayers%5C14208
I can't work out why anyone any ideas?
I have
$rootElement.off('click') set in my app.run
Try changing your slashes to go the other way;
<a ng-href="/players/14208" class="ng-binding" href="/players/14208">Dylan Robertson</a>

target="_blank" in a facebook profile-tab application (iframe)

i need links in a profile-tab app i'm writing open in new browser tabs. i set target="_blank" (with both hardcoded and with FBJS), but when i click on the links, the app page just reloads. i had a look at the html of the app as it's rendered by FB, and each of my links has an onclik event on it, that after creating a new image, returns false.
i tried doing linkDomObjectHandle.purgeEventListeners('click'), but as i expected, that didn't do much.
does anyone know of a way to get this to work?
edit: tested, and "right-click -> open in new tab" and middle-click both do what is expected. just the left click event gets hijacked.
edit:
some code snippets:
i have a template that is cloned, filled and the clone is appended to an element. here is the html of the template:
<div id="hover_window">
<a href="">
<img src="">
<div class="article_info">
<div class="client_info"></div>
<div class="media_info"></div>
</div>
</a>
</div>
i fill the link by doing:
var hover_window = document.getElementById('hover_window').cloneNode(true);
hover_window.setClassName('active_hover_window');
hover_window.getFirstChild().setHref(targetLink.getHref());
i tried adding both target="_blank" to the html and .setTarget("_blank") to the FBJS, to no avail.
pls advise.
This works in my facebook profile tab-app
Link targetting _blank for me
Link test
Facebook edits this link and adds "target" depending on the href-url specified. If it is an internal facebook target, it targets the current frame, if it is and external url, it targets blank. Please just try the link above and see if it works for you (and remove all that javascript and stuff you have)

Resources