MS Excel 365: localhost urls open in native browsers instead of pop-up dialogue - excel

I am using dialogueAsync to open some html pages for my custom application. When the urls are hosted on a remote system e.g. https://so-and-so.com/etc.html it opens up as a pop-up which is like a dialogue box.
The moment I change the url to localhost i.e.to a webpage deployed locally in my system - http://localhost:8080/etc.html, the html opens up in my default browser which as a new tab.
It is very painful to implement waiting / progress dialogues on my local, as dialogue does not close automatically - dialogWindow.close() never works.
Is there any way around?

For the first part: in the manifest that you are sideloading, what is the original base URL? It might be that you need to add your localhost to the AddDomains list:
https://dev.office.com/reference/add-ins/manifest/appdomain.
For the dialogWindow.close(), I suggest you open a separate question, to ensure that the question/suggestion doesn't get lost in being mixed in with your first question.

Related

Excel Hyperlink adding redirectURL

I'm creating a hyperlink in excel
=HYPERLINK("https://www.redacted.com/index.html?Display=GroupMeetings/index","link")
When I click on this link it changes the Url to
https://www.redacted.com/index.html?redirectURL=Display%3DGroupMeetings%2Findex
if I change the URL to have ?Displayy= with two y's it does not add the redirectURL attribute. I cannot find any documentation about why this is added. Anyone know why?
The end goal is to deep launch users to specific pages within the application via a hyperlink in excel.
Do the users need to be authenticated to view the pages you are sending them to?
If so the cause may be this (taken from this answer on super user https://superuser.com/a/445431/154198):
Clicking a URL in Excel seems to open it in your default browser. But that's not really true. Before opening it in your browser, Excel first runs Microsoft Office Protocol Discovery. This uses a Windows/Internet Explorer component to determine if the URL works. (It does not identify itself as Internet Explorer, but as "User Agent: Microsoft Office Existence Discovery".) And if the results are (somehow) okay then it will open the result of that check in your default browser.
Microsoft have issued a fix for this KB218153 - which can be found here:https://support.microsoft.com/en-gb/help/218153/error-message-when-clicking-hyperlink-in-office-cannot-locate-the-inte
This may not be your specific problem, but it is at least worth knowing about.

How to bring interacted IE browser to the front?

Im using RPA blueprism. Ive 2 interacting browser which is passing data between each other but i cant bring the currently interacted browser to the front. That means the process is running on the back of the first browser. Is there any global action that i can use? Ive managed to get the PID of each browser and ive tried using Focus action on html element but no luck. Do help and TQVM in advanced.
Try spying the entire browser as an element and in navigate stage use activate application. it brings the browser to the front.

xpages File Download control - open instead of save?

When you click on the link for an attachment in the File Download control in XPiNC, you are promoted to save the attachment. Is it possible to configure the File Download control to open the attachment directly instead of prompting the user to save it? We're using 8.5.2 FP3.
Handling of an "attachment" is primarily done by the Browser (XPiNC being a firefox browser inside Notes). If for example, a PDF plugin is installed in the browser and the servers sends the corresponding "application/pdf" mime-type with the file, the browser uses that plugin to display the file. The correlation between mime-type and plugin or external application in the browser is something the server/webapplication can not influence.
What you can do on the server side is sending the mime-type "application/octet-stream" instead of the one corresonding to the file type, causing the browser to display the "Select application or download" dialog. So in Xpages, you would have to redirect the download through a XPage, where you set the corresponding HTTP Headers as shown in Set cache headers on an XPage and How to force PDF files to open in browser?
I haven't used the file download control or XPINC, but it is definitely possible to make your xpage or view control open an attachment directly. This method bypasses the download control.
Please see this post from Stephan Wissel: http://www.wissel.net/blog/d6plinks/SHWL-86QKNM, which gives you some SSJS that you can use to build the URL. You can use it in the onClick method of a button. You are essentially duplicating the functionality of the download control in a way that does what you want it to do.
If you want to do the same thing from a view control, then see this post: http://notesspeak.blogspot.com/2013/02/how-to-launch-attachment-from-view.html
Note that different browsers behave slightly differently but it works in all the majors.
Michael,
Here is code I used:
var unid = rowValue.getUniversalID()
var url = getAttachmentURL(unid, "storetransfer.pdf", "Testing//test.nsf")
url = "/" + url + ";"
view.postScript("window.open('" + url + "', '_blank', 'height=120,width=650,top=10,left=10,resizable=yes');");
I did modify Stephan's code a bit since my data is in a different NSF than my code. You probably know this but the view.postScript allows you to call clientside javascript from SSJS. It always is the last thing to run, hence the name. This is the same code from the Notesin9 video mentioned in the comments. I just tested this and it works like I think you want, but in firefox it does try to block the popup, and then has to push "open". Hope this helps.

Chrome extension 2 questions

I have managed with my extension and using ajax call in the content script to call my server and get an answer back. But in the console I get a message like:
The page at https://www.injectedpage.com displayed insecure content from http://www.mywebsite.com/Script.asp
Is there something I can do to prevent this message appear?
One more question please.
If I distribute the .crx to other people, can they see my code in the .js page? I dont want them to know to which page in my server I post the data I send.
Thank you for reading me. And for your patience with me.
The first issue is due to the fact that the website you're injecting code into is https while your page is http. It's a security warning from Chrome that you can't hide.
Yes they can see your extension's complete code. You can obfuscate it but when you publish your extension you give the user the entire code.
If your extension has a popup thing from the toolbar, right click to inspect element and If it has a background page or something, you can inspect it from the extensions page (developer mode has to be checked)
To see all of the files of every extensions, a user can navigate to Chrome's extensions directory. For example, on Win7 it's
C:\Users\[username]\AppData\Local\Google\Chrome\User Data\Default\Extensions
User could also just rename your crx to zip and extract.

How to open a webpage within a BlackBerry application?

I need to open a webpage from a BlackBerry application. I don't want to use a hyperlink so that users have to navigate to the blackberry browser application.
So, I basically need a full screen where the content of that particular page can be loaded just like a browser.
Is weblinks the answer to what I need or do I need to just invoke a browser session?
Thanks!
For BlackBerry applications you can use
BrowserSession session = Browser.getDefaultSession();
session.displayPage(url);
It will automatically open the browser with the given url. It's basically invoking the browser in your application context, so pressing the back button will take the user back to your application.

Resources