HTML 5 Geo Location Browser prompt - html

I've a very simple HTML 5 app which tries to determine the users's current location.
Per the spec, supported browsers are supposed to show a prompt like this: "{XYZ} Would like to know your current location".
What does it work?
This is working fine if I open a broser window and directly open that page.
What it doesn't work?
However, when I get directed to that page via the link I don't see the prompt and an empty page. I have to refresh the page to see the browser prompt. I used FireFox 11 and Chrome on my iPhone 4.
Thanks,

You don't have any control over this as it's implemented by the browers.
As a side note, the Geolocation API is not part of HTML5, it's a W3C specification.

Related

Replace redirect from Microsft Edge to Google Chrome in HTML

in this piece of HTML code
PARTECIPA
the opening of the website in the Microsoft Edge browser is indicated if installed on the device.
Can anyone help me? I would like the site to open in Google Chrome and not in Edge.
How should I edit this HTML?
To open the link using the Chrome browser instead of Microsoft Edge, you can change the value of href attribute like this: PARTECIPA. Assuming that Chrome browser is installed, that should open the Chrome browser.
Problem:
If Edge is not installed on the device (mob, desk or tab) it doesn't
work
In this case, it's best to simply use a standard URL without specifying a specific browser, like this. PARTECIPA. In addition, the "googlechrome:" protocol is not a standardized protocol and probably may not work in all devices. So, you can use a standardized URL like the code snippet I posted above and let the users device choose.
Do you know if instead of chrome I can specify "default browser"
Example PARTECIPA or
something similar?
There is no standard protocol for specifying the default browser. So, best approach is to simply use a standard URL without specifying a specific browser. But if you really want to use special web protocols inside hypertext links to force web pages or files to open with particular browsers on Windows or iOS, place browser-name before the hypertext reference link.
Check this:
Open in Google Chrome
Open in Microsoft Edge
Open in Mozilla Firefox
Open in Apple Safari
Open in Opera
This function does not work!
A similar example is for IOS, which works in the following way
Example :
PARTECIPA
Google has official documentation on the Chrome iOS app’s URI scheme on its developer website.
Simply replace http with googlechrome and https with googlechromes. This means:
http://www.google.com/ becomes googlechrome://www.google.com/
https://apple.stackexchange.com/ becomes googlechromes://apple.stackexchange.com/
Previously, it supported an x-callback-url of googlechrome-x-callback://. This allowed the calling app to indicate its name and URI scheme to Chrome, which would show a back button in the address bar that closes the tab and invokes the specified URI. This feature was removed a few years ago when iOS 9 added the “Back to …” button in the status bar (but the URI scheme still works).

How to open a local HTML file in Safari on an iPad

I'm teaching a Year7 class via Zoom on writing HTML, and I have one student on an iPad (the rest are on desktops/laptops), and they're not able to get their webpage to open in Safari (I'm using Chrome on Windows, which of course is simply a matter of double-clicking on the file). I'm trying to see what she sees, but I think Zoom is possibly not showing me the pop-up dialogues. She is using Notes to write the page (which looked to be the closest iOS equivalent to Notepad).
I Googled and sent her a few blogs, but still not working. I said she needs to click on Share and look for something like "copy path to file" or "copy link", and then paste that into the Safari address bar. She said when she did that Safari was showing the source code, not the rendered page. When she just taps the file it opens in Notes, not Safari. That made me suspect her file was actually index.html.txt (she tells me she has extensions switched on), but when I sent her my own file, which is definitely only index.html, she says the same thing is happenning.
Is anyone able to give me some definite step-by-step instructions (this is for a Year 7 student) on how to open their local HTML page in Safari?
thanks,
Donald.
Safari iPad no longer supports access to local or iCloud files. A number of iPadOS apps will however allow a user to view, edit, and test html code in files stored in local iPad, iCloud, or third party (e.g. Google or Dropbox) storage folders. One needs only to search in the App Store for “html editor” to see the list. Some of the apps have features that rival or exceed those found in tools on desktop (laptop) systems.
I had the same issue today on ios15.
There is a free app called Koder available on the App Store which will let you edit and view the HTML file. I’m no expert but the editor looks pretty fully featured at first glance.
Sorry to say but an iPad is obviously not the best place for simple HTML editing. At least not with the default apps available on iOS.
Given an existing HTML File one can use Files app to navigate to it and open it with double click. This will open the file in a very simple viewer wich is at least able to render the HTML. As a developer i bet its using WKWebView which is basically Safari's HTML View.
Turns out Microsoft Edge, unlike Safari, can still open local html files. Discovered in this answer. To wit:
Install Microsoft Edge from the App Store
Open Files (or whatever file browsing app you like).
Open the file, then tap the Share button to send to another app.
Scroll across to "More...", choose Edge, and voila!

Not able to copy text,XPath or other attribute from the chrome developer tool

I followed the approach mentioned in how to emulate a mobile (android) browser on desktop
to project the mobile webpage's properties on desktop chrome browser. I was successfully able to do that but now I have some queries as mentioned below, please let me know your inputs on that
a) How to use the "Select element option" of chrome developer toolbar to view an element's property for a mobile webpage. In normal desktop chrome browser we have the web page displayed and below that the developer toolbar is displayed and we can easily spot the element using a pointer but with mobile webpage displayed on desktop chrome browser i am not able to use this option as the webpage is not displayed.
b) I tried to copy the xpath and other things from the displayed HTML (HTML of mobile webpage on desktop chrome browser) but it gave me an error that "You need to install a Chrome extension that grants clipboard access to Developer tools". I installed one such extension named: "Auto Copy" but then also I was not able to copy. Please let me know how to go about it.
Thanks a lot in advance,
Namit
For (B) – Judging from the discussion when that message was introduced, it sounds like you need to roll your own simple custom extension to enable clipboard access. Here's a sample manifest.json – I haven't tested it out myself, but it looks pretty straightforward. The extension development Getting Started guide explains how to turn a file like this into a working extension and install it locally.

Internet Explorer Blocked download file

I use jquery post function to go to server and bring the link to file download.
When the func returns the link, I try to open a popup or iframe with link source, to popup save/open file window
I tried this
window.open(data.link,'Download','top=20,width=3,height=3,left=20');
and
document.getElementById('download').src=data.link;
It works in Firefox , but in Internet Explorer it shows the message : "To Help Protect Your Security, Internet Explorer Blocked.."
How do I get over this?
EDIT:
If I do it from direct link from the page it does not show me this message
This is due to IE's security settings. By default, IE automatically blocks any automatic downloads. There's no (legit anyway) way you can get around that except by changing the security settings of the browser. The user will be able to download the file by clicking on the bar that it displays, and click download file.
Well that looks like the popup blocker sort of behavior to me. I don't think you can do anything about this except use an alternative method to fetch the URL.
By the way, visitors are used to the Yellow bar and right clicking on it to get the correct download.
So I don't think you need to panic too much.
Edit:
You're not going to be able to change the security settings of everybody's browser. So either give up, or get by.

Force links in lotus notes emails to always open in a new window?

I'm using C# to generate emails that are read using Lotus notes. The problem is we want the links to always open up in a new window in IE but they always open in the same window when I use "Lotus Notes - Basic Edition" (8.0.1) but when I use the regular lotus notes 8.0.1, they always open up in a new window. I tried looking around in the preferences but can't find a setting that'll explain this.
(note: I'm using IE 8 as my default browser. If I change it to chrome or FF this doesn't happen)
Not sure you are still facing this problem or not, but for the sake of other users posting the solutions.
In Location Preferences, under Internet Browser, don't select "Microsoft Internet Explorer", instead select others and then browse to path of Internet Explorer -
"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Save it. Now your links will always open in different IE window.
When you generate the emails, are you able to enter HTML code for the links? If so, perhaps you just need to add a target="_blank" attribute?
The preferences for which browser to use in Lotus Notes are set on the client's location document, so I'm not sure if that's part of the issue your having?
This sounds more like an admin question, but the link will get opened based on the preferences in the individual client. In 8 basic the location document controls this. Edit the current location document and go to the Internet Browser tab. You can then choose which browser to use. It sounds like you have it set to use IE inside notes, rather than separately.
The fact you can open links properly with Firefox, Chrome means the issue is not with Lotus Notes.
I have seen issues where IE wasn't working with _Blank. Switching off UAE resolved the issue.