C # Displaying different text on tooltip for browser

Is it possible to change the text that appears on hover in the browser. For example:enter image description here

I want the tag text to remain the same, but it was possible to change the gray text that appears when you hover over it.

The rationale for this is due to the presence of the site on the clustered server. I want the main tab to stay the same to avoid user confusion, but to help maintain issues showing the server the site is in a pair.

I have my server name in a bag like:

 ViewBag.ServerName = System.Environment.MachineName;

      

Is it something I can follow, can anyone point me in the right direction?

+3


source to share


2 answers


The behavior you are looking for unfortunately cannot be achieved (at least in current browsers rendering HTML). The text shown in the hover tooltip is not directly controlled by the document, but by the browser. For example, Chrome (like all browsers I know of) displays the full tag content <title>

on hover over the tab name.

I guess you could hack a solution by changing title

when the document body is out of focus, but at this point you should consider if there is a better solution for what you are actually trying to do.



If you only need to support Chrome, manage user computers (for example, in a corporate environment) and really need this behavior, you can create your own Chrome extension that does this ( How to change the title of the current tab using a chrome extension ).

+1


source


I'm afraid you can't change anything other than the title tag because the browser handles it on its own plus every browser does it differently.



0


source







All Articles