This question already has answers here:
How to display text in the browser status bar?
(6 answers)
Closed 6 years ago.
You know when you hover a < a> element and the link appears in the bottom left corner of the browser?
Is it possible to do it with another tag?
No. Setting the status bar manually has been disabled in modern browsers for security reasons. A malicious site developer could make the status bar display a different URL than the one they would be taken to on a link.
The Javascript property used to work like this:
window.status = "Status bar text";
This no longer does anything at all by default on any current browser.
No, but you can put an <a> element over/around another element and 'disable' the link (onclick) using javascript to achieve a similar result:
<a href="//Message in the status bar!" onclick="return false">
<div>
This div shows something in the status bar
but is actually surrounded by a disabled link
</div>
</a>
Related
This question already has an answer here:
mailto not working with large body content
(1 answer)
Closed 2 years ago.
I have a javascript script where I dynamically change the href attribute and trigger the click event.
var href = 'mailto:custom#outlook.com?subject=TestSubject&body=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
var element = document.getElementById('mail-link');
element.setAttribute('href', href);
element.click();
However, the above script appears to do nothing in Google Chrome. On the other hand, it works perfectly fine on Mozilla Firefox where the result is that it opens the default mail client with the appropriate mail recipient, subject and body.
I have also noticed that if I change the href to a shorter value, then Google Chrome manages to open the mail client.
var href = 'mailto:custom#outlook.com?subject=TestSubject&body=aaaaaaaa';
Is it possible to have Google Chrome open large mailto links?
I'm pretty sure that body text is not intended to be the first field of the message. Its intended for short text messages, not long bodies that you're used to seeing like... long bodies of text.
Check this out.
Have a look at how to get around chrome mailto maxlength limit. A suggestion there was to simulate a mail client to omit the issue.
This question already has answers here:
How can we open a link in private browsing mode
(2 answers)
Closed 8 years ago.
Is there a way, via Javascript or other code, to open a url in a private/incognito window from an HTML page? Ideally cross-browser or at the very least IE and Firefox.
The anticipated behaviour would be along the lines of
Link
The simplified reason for this is because admins want to be able to log in as users to preview various pages, but without logging themselves out. Whilst there are various other ways around this issue, this would be the simplest (assuming it is possible).
We can't force the visitor to view the page in an incognito/private window. Browsers provide no API that would make that possible outside of an extension.
This question already has answers here:
Get current URL from IFRAME
(8 answers)
Closed 9 years ago.
I created a web browser type application using a textbox as an address bar and an iframe as a web content host. Upon entering an address in the textbox, the content in the iframe changes and is working properly. When the client clicks on a link in the iframe, the text in the address bar should change according to the content in the iframe - how can I do this?
For example: To begin with, www.microsoft.com is in the textbox and the corresponding page is in the iframe. If I click on a link such as products, the text box text should change to the page in the iframe.
You can use the onload event on your iframe to know when url has been changed. Then read the src attribute and update your textbox.
This question already has answers here:
How can I access the contents of an iframe with JavaScript/jQuery?
(15 answers)
Closed 5 years ago.
I've got a website which has a iFrame in it. The iFrame is linked to an external page. I want to remove some elements in the external website (the website has HTML coding) using Javascript (other methods OK too) WITHOUT anyone clicking on any "remove" buttons or do anything, so it should AUTOMATICALLY remove that element when my webpage and the iframe loads, no one can see it.
For example, I want to remove a website's logo and some contents. I've tried lots of methods but they don't work in iFrame.
Unfortunately you cannot access elements in an Iframe if the Iframe is linked to an external site, there is no workaround using javascript.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
JavaScript: Change browser window status message
When we hover on some link text, the target link is shown in the status bar. How can we hide the link address in the status bar. For example, in following link:
Start Upload
Try this
<a onClick="javascript:$('#fileUpload2').fileUploadStart()" href="javascript:void(0)">Start Upload</a>`
Only javascript:void(0) will show up in the browser window.
James