Change link mouseover text on the bottom of a browser window - javascript

You know that text that appears in the bottom left of your browser when you mouseover a link? How do you change that?
I'm a competent programmer so I don't need a code sample or handholding, but a high level approach would be great.
Thanks!

In old browsers, you could set the property window.status to modify the text in the status bar. Because this holds serious security issues (the user could be tricked into clicking on a link which leads to another target), all modern browsers deactivated this feature.

This can be done with javascript :
onmouseover="window.status='TEXT HERE'"

You can try the window.status property, however this isn't used often anymore as most browsers now block the status bar text from being updated.

Related

How to find elements that are out of page

I'm trying to repair a slideout javascript menu. The problem is, that the 3rd level sub-menu doesn't show although it should. I am sure it has something to do with wrong positioning and the element is showing somewhere outside the page.
Now my question is: is there a browser extension, or some other way to outline an element that is beyond borders of the page?
Thanks!
EDIT: Okay that's weird.. according to the coords it seems to be in the correct position, it also has proper dimensions, is visible and yet I can't see it.. am I missing something?
Yes, use firebug (in Firefox) or Chrome Developer console (CTRL+SHIFT+C) (in Chrome), locate your menu on html tab and checkout the computed styles for that element to see where is it. You can also type any styles you like and see how it affects your menu.
For Firefox, Firebug allows you to inspect the DOM; You can use the HTML tab to find your missing element. When you click on the element, Firebug will highlight it and overlay guides showing you where it is. It will also give you positioning information in the Layout tab on the right, and you can reposition the element by changing its style using the Style tab.
Chrome developer tools already has this built in; Go to Settings->Tools->Developer Tools (or use the keyboard shortcut Ctrl-Shift-I) to activate it. It's very similar to Firebug.

Disable & resize IE

I have a few questions in mind...
I want to disable right click on my webpage so that noone can alter
the source code
I want to disable the addressBar as well
I wish to resize it to a particular size in the bottom right of my
screen & with a text area so that when ever I click the button
inside that webpage all the contents in that text box should be
copied
I tried experimenting but it doesn't seem to work, javascript maybe has some issues.
I wan't it purely on javascript & HTML (Can't use php/asp), want it to work on IE only, dont care about other browsers....
1) I wasnt to dis able right click on my webpage so that no one can
alter the source code
Regardless of browser hackery employed, the user will always be able to view your source. Nobody will ever be able to alter the source code on your server (short of the server being hacked or a vulnerability in your code is found). But, using Firebug (or similar), anyone can change client-side script, CSS and/or HTML.
2)I want to disable the addressBar as well
You can't just gain full access of a browser. That would get annoying pretty quickly (think about the potential browser-inducing epilepsy if every site had control over your root browser and did different things to it). One thing that you could do is have your site create a popup window that is set to a specific size with specific attributes (hiding the address bar, etc). Note that you may annoy users with this as you'll have to deal with popup blockers and such.
3)I wish to resize it to a particular size in the bottom right of my
screen & with a text area so that when ever I click the button inside
that webpage all the contents in that text box should be copied
I have no idea what this means.
Was this post a troll?
You can't disable the address bar with JavaScript.
However you can disable right click. Note: Anyone with enough technical background to know what to do with the source code would know enough to just disable JavaScript to get their right click working.
Here's a demo with source code to disable right click.
Demian's answer has some good insight on what you're asking, I strongly suggest you rethink what you're doing.

Remove file location from document print using Javascript

I am using Javascript to print a div contents it works fine but it also prints the file location on top-right position which gives an odd impression on the output. here i attached the snap of it.
Thanks.
This link has nothing to do with your code. It is put there by the browsers printing engine.
In most browsers, the user can change that, in others (e.g. Chrome) they can't.
Either way, there's nothing you can do from your end.
Your browser controls this. There are no javascript functions to control this (and likely never will be due to potential for abuse)
Thanks to all specially zzzzBov From the menu in the top left corner of your browser, choose "File", then "Page setup..". Go to the second tab called "Margins & Header / Footer", in the drop down lists choose "Blank" for all the items you don't want printed. The screenshot below gives a better view of what I mean.
And for other browsers you can read the complete article on enter link description here

JavaScript window.status

hi this is my first attempt at JavaScript:
the following function is used to display window status bar messages. it works fine on the local machine but when i upload it too the server the messages are not displayed at all.
what am i doing wrong? please help.
[website][link removed]
function displayMsg(msg){
window.status = msg;
}
what should happen is when you hover over the image it should display a message to click it and the image is then updated.
i saw this but if this is no longer possible then why does it work locally?
EDIT: thank you for your answer. i am wondering if it is possible to display a tooltip once the image over event happens? thanks,
EDIT: i have added a Title attribute and it seems to display a tooltip. what you are seeing would be most welcome input. thanks.
EDIT: Google Chrome works fine. Safari does not run javascript. im on win7.
window.status has been disabled in most (if not all) browsers for security reasons (it was possible to fake a different location for links that way).
See e.g. the MDC page on window.status:
This property does not work in default configuration of Firefox and some other browsers: setting window.status has no effect on the text displayed in the status bar. To allow scripts change the the status bar text, the user must set the dom.disable_window_status_change preference to false in the about:config screen.
it was also removed in IE 7.
As to why it works locally, I can't say. Maybe security restrictions are more relaxed there, although it's strange!

change status message on page

I'm using this code to change the status bar of IE.
Google
But the problem is when i'm using a menu (links inside a div) it doesn't change anymore the status bar. Is there any way to fix it?
Most modern browsers allow the user to decide, if she wants the status bar being overwritable. If it is disabled (which is, I assume, the default in many browsers), you have no way to bypass this (other than finding a zero day exploit).
Here's an awesome solution
<a href="//./ Woo status bar" onclick="this.href='http://google.com'">
No, but really though - this practice this a little outdated. Users expect to be able to see the URL of the link they're about to click to ensure it is legit. If you want to give people more information about a link, encode it either in the paragraph (eg: "take a look at this big search engine or this up-and-coming one"), or use the title attribute on the link. The text you enter there will appear in a tooltip if the user hovers on the link.
onmouseover="window.status='Google';
works only for IE. It doesn't seem to work for FF. What browser are you testing it?
I suspect, this works in only IE but it won't work for other browsers.
Link 4
This worked for me on Chrome/IE(7/8)/FF.

Categories

Resources