My application is developed in ASP.NET
In one of my pages(productinfo.aspx) I have a HTML button named & labelled
as print. I am handling the click of this button in java script like
below.
$('#print').click(function($)
{
window.print();
});
The above is working fine in all browsers on PC and in smartphones as well
except Google Nexus mobiles and tablets. It is working in other android
mobiles like Samsung and Sony experia etc..
I came to know that window.print is not supported in Google android and I
should use Google cloud print based on the following link.
https://developers.google.com/cloud-print/docs/gadget
But this requires the user to be logged into to GCP with their Google ID.
But my requirement is like the device will be not connected to Internet
and it should provide the print as dialog as like in other devices.
Note:
In Android chrome browsers there is a print command in the browsers menu
clicking on that is showing the print dialog without any GCP.
Is it possible to invoke the browsers menu command through java script,
I tired simulating (ctrl+p) key press event on the button click assuming
that it will trigger the browser's print command it too didn't work.
It would be very much helpful if any one can help me with a solution for
this issue.
Related
We have a Kiosk App (written in React) and it is working on ~800 devices. All of the devices are Windows devices and for some of them (about 5%), when a user without tech literacy uses more than one finger (lets say he tries to input his customer number but with using three fingers instead of one) the app crashes after a point (Google Chrome is not responding error).
I do not know why, but when I tried to debug the app on live environment using localhost:9222 as my Chrome DevTools output, I could raise some errors while scrolling and clicking the app, but I cannot create the user input remotely, because I am using a mouse, not a touch screen. And I cannot debug on the devices.
Does anybody have an idea on what is wrong? And how can I stop the crashes?
What I tried to do so far;
Tried to enable Crash Logs, couldn't make it log to a file so I can inspect it, nothing gets logged
Tried to create a chrome console log file, but nothing is shown here too
Tried to change screen input type from touch to mouse click, didn't fix it
Tried to use Chrome Command Line Switches such as disable-pinch and enable-crash-reporter but none of them seem to give me any info or fix the problem
Any tips?
We are going to develop a plugin in chrome which is going to use in HP chrome box.Once we connected the respective HP chrome box to any device it should automatically open the wifi setting and it should detect the available wifi's and it should display those list.
Please Suggest the methods or ideas which will be useful for our implementation
Last couple of hours, i was trying to implement clipboard copy on iOS using different ways but no luck nothing is working on cross platform. I have tried different method using
zeorclipboard
clipboard and
jsfiddle
As the snap showing a code and a button below that, this is a webpage on safari browser on IPHONE and i just want to copy that code into clipboard when i press the copy code button and use that code on my APP page for verification but it is not working as i desired. With the fiddle code, when i click the button it focus on the code text-box but not select or copy that.
N.B: it is working on Firefox and chrome browser but i need it on iPhone safari browser except using flash. please help me out, i am badly need it
I have a website where editors write articles using a custom built CMS. Once done they generally test these articles on desktop, but not mobile. To fix this I was wondering if there is an easy way to launch chrome using html/javascript such that I can provide it a url and one of the device emulators? (Keep in mind these are non tech people, and would be easily confused if I asked them to emulate themselves). If thats not possible then launch chrome in a new tab with specific width and height (which matches a mobile device)? Also if possible I would prefer these new windows to be incognito so that I do not save cookies in their sessions. Is there any way to do this? Any ideas would be appreciated. Thanks for reading
Chrome Provides Device Emulator as shown in below screenshot. by pressing the f12 ( Developers tool ) you can find the option. by selecting that "Device Emulator" Icon. You can choose the device as shown in below screenshot and change the device Os and device type and resolution and Orientation.
I'm helping to build a webpage that is mobile friendly. We are currently in beta and using the "Add to Homescreen" function of Safari on iOS to make the webpage appear as an app. Is there a way through javascript or html to code a link to Safari's share menu? We want to be able to access this share menu from the bookmark shortcut rather than having to be in the actual Safari browser on the phone.
This is an old question, but as of iOS Safari 12.2 and macOS Safari 12.1, Safari supports Navigator.share() to display the system share menu.
The Share menu in Safari is a component of the browser, not the web page. It cannot be linked to.
If you want your users to activate the "Add to Homescreen" function of Safari, you will need to instruct them to press the Share button themselves.