w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Problems while previewing image before upload on mobile browser, works fine on desktop browser
Modified another code snippet for it to work properly on browser. The code snippet, I modified is mentioned at the link below. Preview an image before it is uploaded Below is the code snippet which work properly on both desktop browser as well as mobile browser. <!DOCTYPE html> <html> <head> <title>File API- FileReader as Data URL</title> </head> <body> <input type='file' id="imgInp" /> <img id="myImage" src="#" alt="your image" /> </body> <script> function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { document.getElementById('myImage').src=e.target.result; } reader.readAsDataURL(inpu

Categories : Javascript

Display ESRI Shapefiles in a map in a browser. (Non Google Maps)
If you want to render your shapefile on the server and send the results to the browser, then you can use a Map Server or WMS Provider like GeoServer (http://geoserver.org/). GeoServer is an open source software server that allows users to share and edit geospatial data. When you serve your shapefiles in GeoServer, you can use any libraries like OpenLayers to display this data in browser (http://openlayers.org/).

Categories : PHP

Detect Desktop and Redirect mobile browser to Desktop Main Website
So if you want to detect a desktop trying to view the mobile version put this in your .htaccess file: Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^m.domain.com$ RewriteCond %{HTTP_USER_AGENT} !(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino [NC] RewriteCond %{HTTP_USER_AGENT} !^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|

Categories : PHP

Width cut off on mobile, works resizing desktop browser
use this code for iphone 4 Screent width Between 320px to 480px .container { text-align: center; margin-left: auto; margin-right: auto; } @media and (min-width : 320px) and (max-width : 480px) { .container { width:75%; } } Else use below code for <320px widht screen .container { text-align: center; margin-left: auto; margin-right: auto; } @media (max-width : 320px) { .container { width:75%; } } And your mistake is, You wrongly put min-width : 320px instead of max-width : 320px More...

Categories : CSS

Browser requests file, server downloads pdf, browser displays pdf in iframe
Probably what you meant was simply: var uri = '/viewer/loaddrawing/'; document.getElementById('iframetitle').src = uri + '?key=' + value; There is no JSON involved, so the iframe will get a PDF directly. However, notice that the client must have a PDF-viewer plugin, otherwise the browser will ask for a download prompt.

Categories : Javascript

Inexplicable font-size change from desktop to mobile browser
Turns out mobile Safari decides to change text size for you! I saw a solution on this page that worked: Fix font size issue on Mobile Safari (iPhone) where text is rendered inconsistently and some fonts are larger than others? I put the following in my CSS to prevent mobile safari from messing with my text size. body { -webkit-text-size-adjust: 100%; }

Categories : HTML

http works fine in mobile browser, but https totally lags in mobile browser
Try to use online tools to make sure nothing is wrong with your certificate. example DigiCert. Also check in your browser if there is a problem with the certificate (Chrome makes easy to check this, click on the secure icon at the left of the URL). If all I said above is file I think the problem is from your HTTP server configuration. Are you using port 443 and did you change default values?

Categories : Http

html background image appears correct on desktop browser, not on mobile
Quoting from "The Definitive Guide To HTML/XHTML 6th Edition": "HTML and XHTML documents can wind up in the strangest places these days, such as on cellular phones. To help the browser figure out the best way to render your documents, include the media attribute within the tag. The value of this attribute is the document’s intended medium, although it doesn’t preclude rendering by other media. The default value is screen (computer display). Other values include tty (text only), tv (television), projection (theaters), handheld (PDAs and cell phones), print (ink on paper), braille (tactile devices), embossed (Braille printers), aural (audio; speech synthesis, for instance), and all (many different types of media). If you want to explicitly list several types of media, instead of specif

Categories : HTML

web-browser displays nothing when parsing xml file using Javascript
That is because you are using an ActiveX object to do the parsing, it is only available in IE browsers. Since you are loading XML from a file, ry using XMLHttpRequest instead. It is implemented in IE since version 7 along with chrome, firefox, safari etc. Here is a good explanation and some democode for you: http://wordsfromgeek.blogspot.se/2008/11/xml-dom-in-chrome.html?m=1

Categories : Javascript

Image looks terrible when viewed on a mobile browser, but perfectly fine on a web browser
You'll have to use a responsive layout to resize the image according to the screen size. Example of responsive layout rule: @media screen and (max-device-width: 480px) { .column { float: none; } } You can always search "responsive design" at any web search engine to get great references.

Categories : HTML

Mobile Browser Compatibility: Site dont pinch in iOS browser
Try adding user-scalable=yes to your viewport meta tag <meta name="viewport" id="view" content="width=device-width minimum-scale=1, maximum-scale=1" /> to give you <meta name="viewport" id="view" content="width=device-width minimum-scale=1, maximum-scale=1", , user-scalable=no /> And I would move your Meta tage up near the top with the rest.

Categories : HTML

Browser is getting hang up on loading of over 800 markers on google maps
If you are using V3 api then kill the map before loading new markers, then initialize the map again and plot new markers. So it will save time and increase performance little bit. In V2 api you can use map.clearOverlay() to remove all markers at a time...

Categories : Google Maps

google app script list view behavior different on pc browser vs mobile
it works as any other listBox on android browser, you should modify your code if this layout is not good for you. But it also generates an error when one select an item, see screen capture below

Categories : Google Apps Script

reload page on mobile browser javascript
This is a pretty crazy idea to reload the page all the time in full, your users will hate you. If you are going to do it, just do partial updates to the page. Anyway, to answer the question, check the PageVisibility API(Chrome) or the specs. This event fires when the page is visible to the user either by bringing the app into focus or by changing tabs.

Categories : Javascript

Javascript/HTML mobile browser emulator
you can use Ripple Emulator it emulates many devices and many platforms. first open chrome(chrome adds on) ,open this URL on chrome : add it on chrome , you can then enable it on disable it as you need, (write click enable/disable) see how it looks:

Categories : Javascript

My applets do not display in my browser (Google Chrome)
In the Applet class, main() method is not there. Please try to execute the below example:- import java.applet.*; import java.awt.*; public class HelloWorldApplet extends Applet{ public void paint(Graphics g){ g.drawString("hello world" , 25, 50); } } - <html> <title>Applet application</title> <hr> <applet code="HelloWorldApplet.class" width="320" height="120"> If the browser is not java enabled then this message will be printed. </applet> <hr> </html>

Categories : Java

Restrict browser refresh, f5, browser back like banking sites through javascript/jquery
(1) No. There no possible cross-browser way to control browser functionality with javascript/jquery. (2) Banking sites do not restrict or control the browser functionality. They only ask users to desist. At most they attempt to detect some actions and then show errors. But, they don't try to control the browser. (3) This is a bad idea.

Categories : Javascript

Browser and mobile issues with parallax background (javascript/jquery)
I solved it with this: if ( x > 90 ) { x = x - (2 * (x - 90)); } else if ( x < -90 ) { x = x - (2 * (x + 90)); } You get the distance from the number to 90, multiply it by two, and subtract it from the original number. This means that 0,180 becomes 0,90,0. And 0,-180 becomes 0,-90,0.

Categories : Javascript

the browser displays jsp code not the output of it
You need to run your JSP in a servlet container in order that the Java code is executed, e.g. Apache Tomcat. The servlet container runs the java code on server side and sends the response to the client. Since you wrote you just started learning JSP and web technologies, this question might also be helpful. It contains also some information about Servlets, JSPs and web containers and how they work together.

Categories : Jsp

Mobile browser (iPhone) unable to display very big image (e.g. 4096 x 4096)
Maybe this is not the solution to your problem but adding the responsive class to your image might solve the problem: Images in Bootstrap 3 can be made responsive-friendly via the addition of the .img-responsive class. This applies max-width: 100%; and height: auto; to the image so that it scales nicely to the parent element. <img src="..." class="img-responsive" alt="Responsive image">

Categories : Image

Javascript: Prevent browser to display input history for a field on press of down key
You can disable autocomplete by adding autocomplete="off" onto your input tags. MDN Reference Example <input type="text" name="email" value="" autocomplete="off" /> See this Stack Overflow post for browser compatibility.

Categories : Javascript

My Website displays properly in every browser except Firefox
This is browser compatibility issue ..you have to used CSS reset you can found here is the link http://meyerweb.com/eric/tools/css/reset/

Categories : HTML

Browser Console for AOL Desktop?
What I meant in my comments, you could just use a very decent JavaScript debugger with manual DOM inspecting features, which comes with Visual Studio ([EDITED] including the free edition). With some tricks, it does work for AOL Desktop, too (what an amusing piece of software that is, BTW :) Of course, this is not the same as IE's F12 Tools, it lacks the interactive features like visual DOM tree, CSS tracing etc. But it still allows to step through the code, watch locals and objects, evaluate expressions and access DOM elements. It's an invaluable tool and I use it a lot for projects where we host the WebBrowser control. After all, that's what AOL does, too. Anyway, if you're already familiar with this, just give this post a smile and disregard it. Otherwise, read on :) I tested the foll

Categories : Debugging

How to easily run desktop Java application via browser?
Open the JNLP file and add the required files as resources. <resources> <jar href="OrigamistEditor.jar" main="true"/> <jar href="Origamist.jar"/> <jar href="another_required_files.jar"/> </resources> It would be ideal if you packed all your resource files into a single JAR file. But I wonder why Netbeans wouldn't add these resources itself...

Categories : Java

How to Create Desktop Application Using Java and run through Browser?
Hibernate is an object to relational mapping tool. You can definietly create desktop applications using Hibernate because what they do is represent database tables as java objects. The core concept of spring is dependency injection i.e. injecting objects into the program at runtime. Spring framework can also be used to create desktop applications. You can find a good link here for spring and for hibernate

Categories : Java

IBM Worklight 6.0 - Desktop Browser environment does not work in Facebook
The Canvas URL is missing the Worklight Server's context root, for example: http://myHost:10080/fbtest/apps/services/www/fbapp/desktopbrowser/ Where fbtest is your context root, which is your project name by default. In my tests the app was successfully loaded and displayed: Make sure to also setup the publicWorkLightHostname in serverconfworklight.properties. See if that helps. See full-size image here: http://i.stack.imgur.com/D2xEI.png

Categories : Facebook

Jquery-jsonp gives "error" on Android, but not in desktop browser
So I figured it out thanks to this Q&A on Stackoverflow. It's about access origin. And it's not Android getting in the way, but Phonegap. Phonegap does not allow cross-domain unless you specify the domain name in the config.xml file. To be precise, put it in the config.xml file in the [myProject]/www folder, or it will be overwritten at next build. This is the Phonegap documentation on whitelisting.

Categories : Jquery

Debugging Phonegap with Java plug-ins via desktop browser
The simple answer is NO, you can't run those Java plugins in a desktop browser. Since the plugins are written in Java, I'm assuming your target platform is Android. Phonegap plugins provide native extensions to the native phonegap application. Although desktop browsers themselves can run Java, Phonegap plugins for Android are extensions which rely on the classes in the Android SDK and all the layers below that forming the Android operating system. If it's not the Java plugins themselves you want to debug but the rest of the phonegap app written in Javascript, and if the plugins are not essential to the rest of the app, you could potentially stub them out. Then you'd be able to debug the HTML/CSS/JS using the phonegap emulator. If the Java plugins are not easy to decouple or its the plug

Categories : Java

How to make an exe in mobile that will open my website in mobile browser?
If you want to open their default browser to your website it can be achieved by using an intent: Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse("http://example.com")); startActivity(i); But it might be better to encase your website in a webview to better use the application that is being deployed to the device. http://developer.android.com/guide/webapps/webview.html

Categories : Android

Linking to Google Maps from Desktop App
So you just have a link that opens the Google Maps website in a web browser (which includes a webbrowser control)? And you're not using a Google logo for the link? That's fine! As they said, they appreciate it. :-) Generating the link dynamically doesn't change that. And no, you're not using the Maps API, so the API terms of service don't apply.

Categories : Http

Video auto play is not working in Safari and Chrome desktop browser
The best fix I could get was adding this code just after the </video> <script> document.getElementById('vid').play(); </script> ...not pretty but somehow works.

Categories : Javascript

selenium web driver on windows 7 parallels vm - browser hidden - allow service to interact with desktop?
Unfortunately, this is a common problem with selenium (or any other browser automation software) on Windows. If selenium is running in the background as a service, the browser will not appear when the tests are being run and taking screenshots will just result in a black picture. If you want to be able to watch the tests being run and grab screenshots, the general consensus is to start your script manually from the command line and leave it running.

Categories : Windows

How to Prevent Image SaveAs + Prevent Image Drag&Drop to Desktop + Prevent Screenshot on a Desktop Browser
To prevent the user right-clicking on the image and choosing Save As, you can add the code oncontextmenu="return false". oncontextmenu detects the user right-clicking and return false stops the action. Then if you do the code draggable="false" the user can't drag the image, even if they select it. I don't think there is a way to stop people using screengrabbers, but here is some code that stops Google Images and other search engines grabbing the image: <meta name="robots" content="noimageindex"></meta>. So all in all, try this method: <meta name="robots" content="noimageindex"></meta><img src="mygreatimage.png" alt="An awesome image" oncontextmenu="return false" draggable="false">

Categories : PHP

Different result from browser and from mobile
Ok, at least, i found the problem. I wrote a little app, what is try to use these requests. As i mentioned, in the browser was everything was fine. I never tried to use net from android till now, but now i did it, and when i want to log in the user, logcat says: 07-16 12:52:42.890: W/ResponseProcessCookies(9125): Cookie rejected: "BasicClientCookie[version=0,name=wordpress_d0c0d54098055ddfb5fe7a1313b4d3b5,domain=.anydomain.com,path=/wp-content/plugins,expiry=null]". Illegal path attribute "/wp-content/plugins". Path of origin: "/service/app_request.php" So that was thy developer can not log in the user on the phone... Unlucky, i am not familiar with android in this depth, so i do not know the solution for this. I've checked the cookie problem at here: Java HtmlUnit - can't login to

Categories : PHP

How to show pdf on the mobile browser?
PDF's in iframes are not cross-Browser consistent, and there is not a lot you can do about it. The user may have to scroll in some iframes on certain Browsers. You may want to consider <a href='a.pdf'>PDF Name</a> instead.

Categories : Pdf

Click event not generating on google maps here https://developers.google.com/maps/documentation/javascript/examples/event-simple
You can try zoom out, after click marker for: google.maps.event.addListener(marker, 'click', function() { map.setZoom(8); map.setCenter(marker.getPosition()); });

Categories : Google Maps

Display different button/download link on website depending on mobile/desktop OS
Check out http://lessframework.com/ on how to work with @media in css. Then what you would check for is not the OS or device, but the width of the window in the browser. If it's a desktop, display div a (with button a) and hide any other. If it's a mobile device (smaller screen resolution), then, hide div a, and display div b (with button b). Example in css: #a {display:block;} #b {display:none;} @media only screen and (min-width: 480px) and (max-width: 767px) { #a {display:none;} #b {display:block;} } Note however, that the div a and div b both have a button in them... So if you hide the div, it'll hide the button as well.

Categories : Javascript

Google Maps Android Api V2 - maps dont display
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="MyOwnGeneratedKey"/> You need to use Google API console to generate your own key using A1:FE:B5:E2:5E:0E:1A:8E:CC:8F:07:CC:4D:D0:95:13:0B:E7:1B:EC;com.example.mapdemo and then substitute it in the manifest. The format should be something similar to AIzaSyB-sKpf4b9kSM6DX40WyjExC7VTRabAvcw Also, you need to flick the switch on the Google Map API v2 in the services page in the API console.

Categories : Android

How to support PDF viewing for all mobile browser?
The best way is just too just add a link to the abc.pdf it will open on a new tab. This would work best for mobile browser rather than embeding or implementing plugins. <a href="abc.pdf" target="_blank">ABC PDF file</a>

Categories : Android

How to over-ride mobile browser(s) auto-fit?
here is a helpful article that you should read: https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag You can use the viewport meta tag, as explained in the article above

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.