Desktop webpage - html

I have a webpage which has links to documents (MS Word .doc files). If you view this webpage on IE8 directly, and click on one of these document links, it opens up a new IE8 window/tab and displays the document directly in IE8 with a limited MS Word tool bar which is perfect.
If I then change the desktop background to the webpage, if the user then clicks on the same document links above, the documents open directly is MS Word. Why is this happening? I need it to continue to open directly in a new IE8 window.
This is what the HTML link looks like:
Document 1
This bit of HTML works perfectly in IE8 directly, but when the web page which contains this link is used via right click desktop in XP > Properties > Desktop > Customize Desktop > Web where the webpage url is added to show the webpage on the desktop, if I then click on the above document1.doc link, it opens in MS Word instead of IE8.

You could indeed try to set the target to _blank, but if this doesn't work, I think i have a solution.
Create a new html page in the same directory as the one you're running from your desktop.
This should be the content:
//keep in mind: the javascript code ain't mine, but it works ;).
<html>
<head>
<script type="text/javascript">
function getQuerystring(key, default_)
{
if (default_==null) default_="";
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
var qs = regex.exec(window.location.href);
if(qs == null)
return default_;
else
return qs[1];
}
document.location = getQuerystring('redirect');
</script>
</head>
<body>
you're being redirected
</body>
</html>
On it's own, this file doesn't do anything. But if you change the links on your desktop HTML file to
NAME_OF_NEW_FILE_THAT_YOU_JUST_MADE.html?redirect=LINK_THAT_YOU_HAD_BEFORE
it's all a little sketchy, but it works. It will open in your browser, because it's HTML. And it will open your file as well, thanks to JS

The default behaviour when opening MS Word files in IE8 is to open them in a new tab with the limited toolbar. When you are using the same page as a background on Active Desktop you are no longer using IE8, and therefore it will open directly in MS Word.
So, I dont think there is a way to "embed" the document as a background or to trigger it to open IE8.

target = "_blank" would open in a new tab, which I don't think Active Desktop supports. Try target = "_self"

Related

target="_blank" not working in Google Chrome on mobile devices (Android)

I used the tag to link a pdf (which is stored in a folder in my website) with the attribute target="_blank", but it doesn't work on mobile devices (android)
My code:
Catalogue
This works just fine on desktop, it opens the pdf in a new tab of the browser, as it should with the attribute target="_blank".
HOWEVER, I tested this on mobile and the result was:
It works on iPhone using safari, BUT it doesn't work on Android using Google Chrome. Instead of opening the pdf in a new tab it automatically downloads the file.
Is there any way to change this behaviour?
I've also tried using target="about:blank" instead, but it didn't work
Try using the rel=”noopener” or rel=”noreferrer” link attributes for every link.
The rel=”noopener” link attribute prevents the linked site from receiving access to the original web page that is linking out. This prevents the linked site from taking control or otherwise influencing the linking site.
The rel=”noreferrer” link attribute hides the referrer information from the site that is being linked to. When a site visitor clicks a rel=”noreferrer” link, the site being linked to won’t know what site referred the visitor.
For example, if you code a link like this:
<a href="https://www.example.com/" target="_SEJ" rel="noreferrer">
The above link will open in a brand new browser tab.
For further guidance do visit this site:
https://www.searchenginejournal.com/blank-link-attribute/435883/#close

How to Automatically redirect website IE browser to Chrome browser?

Recently we migrated to latest version of application which allows the user to open application in any browser.
Earlier it use to support Only IE browsers.
After migration many users still open the application in old browser.
Since the application is very slow in IE browser.We are looking for a solution that will automatically open the URL/Login Page in Chrome browser when user opens in IE browser.
i.e., when a user open URL in IE browser it automatically open the same URL in Google chrome browser.
Google Chrome Legacy Browser support allows this. Under the "Hosts to open in Alternative Browser" policy, put in an entry for the site you want to force to open in Chrome, preceding it with an "!". Example:
!https://www.somesitetoopeninChromeonly.com.
If i understand it correctly, the users open a page in IE and when they click an url on that page, it will open that URL in Chrome.
I guess, you can't do this. You can use target="_blank" to open a new tab in the same browser.
If you want to open a link from an application in chrome and not in IE, you can change the default browser to chrome. Click on Start, type the "default app settings" and change the default browser to chrome.
I think the best solution is to let the user open Google Chrome manually by informing about it.
It is possible however, to make a document called "chrome.hta" for example, with the contents shown below, and then link to it on another page. (This will only work in Internet Explorer, not Edge)
<script type="text/javascript" language="javascript">
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
var website = "http://example.com/";
oShell.ShellExecute(commandtoRun, website, "", "open", "1");
window.close();
</script>
The user now has to press "open" and "allow" after they click the link referring to the .hta file.
Now, on the page where you link to the .hta document, you can make the page detect the browser and adjust the link accordingly:
<a id="link" href="example.com">My Application</a>
<script>
if (navigator.appName == 'Microsoft Internet Explorer' || !!(navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv:11/)) || (typeof $.browser !== "undefined" && $.browser.msie == 1))
document.getElementById("link").href = "example.com/chrome.hta";
</script>
A bit late, but we have two different solutions for this:
We use a javascript: link to use ShellExecute to run a small exe helper application that checks if Chrome is installed, and if it is, open Chrome to the URL parameter, optionally with switches (e.g. --use-system-default-printer and on shared logon PCs, --incognito). This requires configuring special permissions for the site in Internet Options|Security.
Now we can also use the microsoft-edge: protocol to open sites in Edge.
You could also install your own protocol for opening sites in Chrome but you would need a helper application to re-write the URL. I have one written to add microsoft-edge-private: to open links in Edge in InPrivate mode.
To open the webpage in Microsoft Edge you can try the below code.
TEST

Outlook 2010 Anchor (url/address/link)

I'm trying to link To a specific PDF page from MsOutlook'10 or MsWord'10, the #page=... anchor is particularly useful and works fine elsewhere. Unfortunately when I click [ctr-K] in Outlook or Winword, my links are re-formatted assuming a UNC path. The PDF file is located on a shared drive.
Using the "file:" prefix links will open a PDF in Adobe Reader (outside of the browser), and "http:" will open inside a browser. The issue is that I seem to need to open in a browser with the "file:" prefix in order for an anchor to work. I know the anchors work inside a browser. Outlook uses the Windows/Explorer Default Program (based on file extension) which always seems to open in Adobe Reader neglecting my anchor.
Is anyone aware of a solution, to link to a specific page or bookmark of a shared-PDF from a MS Outlook and/or winword link?
Common references:
mailermailer.com/...anchor-tags-html-emails
campaignmonitor.com/...anchor-links-in-email-newsletters/
stackoverflow.com/...anchor-in-pdf-document

What's the magic of those links that will open a new browser like in firefox?

<a ... target="_blank">...</a>
This kind of link only opens a new tab,but some websites will open a new browser instance,what's the trick?
In Firefox, opening a link in a new tab or window is controlled by the browser's setting. There are ways to manipulate it such as:
window.open("", "test", "height=300,width=300,modal=yes,alwaysRaised=yes")
If both links are the same in all these websites, so there is a javascript window.open get called in the links which open new browser.
It is based on the browser settings, that why I said that if all links looks the same and some act different than other so there is some javascript work.
By the way,
If you set the target attribute to
"_blank", the link will open in a new
browser window or a new tab.
Based on the browser settings

html - how do I make a page load in a new tab in IE8?

What combination of html and IE8 settings get IE8 to open links in a new tab. Or can you not do this with IE8, and you only get the new tabs by manually selecting File-> new/duplicate tab?
My website works in Firefox - pages on the site load in the current tab, and links off site load a new tab. IE8 won't behave: target="_blank" opens a whole new window; the other options, _self _top _parent, all open the page in the current tab.
I have Firefox set to "Open new windows in a new tab." The links to pages on my site all have target="_self" and Firefox keeps these in the current tab. On the external links I don't have a target set (I added _blank to see if it fixed IE8, and doing that didn't affect Firefox).
I can't find an equivalent setting in IE8. Tools-Internet Options-General-Tabs/Settings has an enable tabs box, and a sub-option to automatically switch to newly opened tabs. Is there some html that will work? An IE8 setting I'm missing?
Any help appreciated.
It is not a thing you can control from HTML code, as it should be user's, not document author's decision how to open a link.
To open pop-up windows in new tab, follow instructions from IE8 help:
To change how pop-ups are displayed
In Internet Explorer, click the Tools
button, and then click Internet
Options. Click the General tab, and
then, in the Tabs section, click
Settings. Make a selection in the
When a pop-up is encountered section.
Click OK twice.
Updated:
Reading OPs comments to other posts, it seems like the intent is to make all external links open in new tabs. However, it is not document author's choice how the client should open any link in any page - it has to be decided by the client. Moreover, even though you can create a client-side script which sets "target" property to open pop-up windows, there is no notion of "tab" in Document Object Model and hence you cannot do it even in a script.
The answer to the question was posted in the comments (but is now deleted). Now you can test it in IE8 - just use the middle mouse button to open the link in a new tab. Firefox does work better with tabs.
How the browser interprets the target is browser dependent - each vendor will specify what they want. Firefox decided to use a new tab, IE decided to use a new window.
The html 4.01 spec has this to say on "_blank":
The user agent should load the designated document in a new, unnamed window.
The spec predates the wide usage tabbed browsing now has, so doesn't mention the concept anywhere.
Opening a page in a new tab is concept that believe is not covered by the html standard. The Firefox behavior is just a setting in the browser, which IE8 might or might not have.
On a related note, I personally find it abusive of websites to make the choice of opening a page in a new tab/window. What if I want it to open in the current tab/window?
Of course, in a rich application-like site that is basically entirely an application I find it convenient that pages open in a new tab/window. This makes them work more like desktop apps
For normal pages, I would suggest not setting the target at all and let the user decide.
I think W3.org is still working on this issue, but it isn't implemented in any browser yet. Also remember that Internet Explorer will be the last browser to implement it ;)
This is code copied from a W3 Working Draft:
/* If a user wanted to have new windows open in new tabs instead, she could use the following user style sheet to do so: */
* { target-new: tab ! important }
Of course, it is impossible to set user preference in HTML or Javascript -- it would be unsafe.