What is the best way to remove the Tooltip (Title) from the a tag created by the WebYep Attachment action? Was able to get it done quite simply with CSS and while it works fine in Safari it’s a no go in IE.
IE has a bug in many versions that causes it to show the ALT text of an image as if it was a TITLE applied to an A tag. Unless you have specifically added a TITLE tag to an element, you shouldn’t see these in modern versions of IE, but you probably will in older versions like 8 and below.
Just to be clear, it is perfectly normal for a tooltip to appear in any browser when you hover over a link that has a title attribute applied to it. If you don’t want a true TITLE tag to appear, you simply don’t apply one.
If you don’t want the ALT tag to appear in a tooltip in broken browsers, then you can do this:
<!--[if lt IE 9]
<script type="text/javascript">
var images = document.images;
for(var i = 0; i < images.length; i++){
var img = images[i];
img.alt = '';
};
</script>
<![endif]-->
Put that at the bottom of your code, in the Before /body section of the Page / HTML Markup dialog. There are no dependencies (Prototype, jQuery) needed.
Walter
On Jan 2, 2014, at 11:39 AM, TeamSDA wrote:
OK, perhaps this will be a little more straight forward…
What is the best way to disable / suppress tool tips (titles) on a page?
Most of my research has turned up JavaScript solutions. If this is in fact the best approach what is the best way to ex acute this inside of Freeway?
On Jan 2, 2014, at 11:50 AM, Walter Lee Davis wrote:
Just to be clear, it is perfectly normal for a tooltip to appear in any browser when you hover over a link that has a title attribute applied to it. If you don’t want a true TITLE tag to appear, you simply don’t apply one.
Again the reason for removing the Tool Tip is that they are being dynamically applied by WebYep and thus can’t just be removed are not added. Walt your response looks close to what I am looking for but appears to be an IE9 fix.
Just looking for a clean way to strip the Tool Tip from either an “alt” tag or an “a” tag that is being dynamically placed on the page vie WebYep? It’s acceptable if the solution removes all Tool Tips from the entire page.
<script type="text/javascript">
var links = document.links;
for (var i=0; i < links.length; i++) {
var link = links[i];
link.title = '';
};
var images = document.images;
for (var i=0; i < images.length; i++) {
var img = images[i];
img.alt = '';
};
</script>
Again, put this at the bottom of your page code, in the Before /body section.
Walter
On Jan 2, 2014, at 1:10 PM, TeamSDA wrote:
Hello Ernie and Walter…
Again the reason for removing the Tool Tip is that they are being dynamically applied by WebYep and thus can’t just be removed are not added. Walt your response looks close to what I am looking for but appears to be an IE9 fix.
Just looking for a clean way to strip the Tool Tip from either an “alt” tag or an “a” tag that is being dynamically placed on the page vie WebYep? It’s acceptable if the solution removes all Tool Tips from the entire page.
Yes. There are two examples of the same script inside one script block. They don’t actually need to be in separate script blocks. It’s slightly a drag on the browser to keep opening and closing script contexts, so it’s measurably (but not meaningfully) faster to have one script block in your HTML page with all the scripts inside it. If you start from the line you quoted until the end of the script block, you will have the entire image-related part of the script.
Walter
On Jan 2, 2014, at 1:23 PM, TeamSDA wrote:
This looks promising…
So if I want to get a little more control could I separate this into two scripts, one for Images and one for Links?
If so is the where I would start the separate script for the image?
Just what I was looking for. Did a quick test with the “a” tag and it seems to be working on Safari, Chrome, Firefox and IE 7-10. Many thanks, your the best!!!