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

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

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

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

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

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

Sorting DOM elements does not work propperly on mobile devices(android browser, chrome, safari)
I found a solution to the problem. $('div#mainFrame div.element-container').sort(function(a, b) { return parseInt($(b).data('price')) - parseInt($(a).data('price')); }) .appendTo('div#mainFrame'); The reason for this is that the sort expects a number, not a boolean return value.

Categories : Javascript

How to make this Javascript function work in IE Browser?
You can use this jquery function to enable only digites, points, comma: $('input').keydown(function(event) { // Allow: backspace, delete, tab, escape, and enter if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 || event.keyCode == 188 || event.keyCode == 190 || // Allow: Ctrl+A (event.keyCode == 65 && (event.ctrlKey === true || event.metaKey)) || // Allow: home, end, left, right (event.keyCode >= 35 && event.keyCode <= 39)) { // let it happen, don't do anything return; } else { // Ensure that it is a number and stop the keypress if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (e

Categories : Javascript

How to make this code work in ie browser- version 10?
In theory, nav ul li:hover should work in all browsers (example) That only assumes there isn't any other CSS. Without knowing what the markup looks like though, you could try targeting the descendant anchor elements: nav ul li a:hover { background:yellow; }

Categories : CSS

Make browser's back button work when using hide and show (jquery)
You can use jquery load function to load white part For example; $('#result').load('ajax/test.html'); And in back button event you can load the white part jquery hide and show window.onbeforeunload = function() { $('#result').hide(); }; or window.onbeforeunload = function() { $('#result').show(); }; jquery load function window.onbeforeunload = function() { $('#result').load('ajax/test.html'); };

Categories : Javascript

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 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

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

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

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

Responsive is not working on mobile, but does work on desktop
Your code is having multiple bootstrap css files (ver 2.1, ver 3) Use one version at a time. Try changing blue box classes as below. (As per http://getbootstrap.com/getting-started/#migration) and your code will work fine. <div class="row"> <div class="col-lg-4"> <div class="col-lg-8"> </div>

Categories : HTML

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

bootstrap/html -- How do I get the mobile slide-down nav to work on desktop resolutions?
Try deleting the class "collapse" from <div class="nav-collapse collapse"> and see how it reacts. It's possible that data-target needs all classes of a div and not just one, for example: data-target="nav-collapse.collapse" Hope this helps.

Categories : Jquery

Ignore a script on a Mobile browser
You'll need some server side logic here to add the script dinamically. You can inspect the request headers and detect the user agent. If it isn't a mobile client, add the script link with server side language, and the opposite if it's.

Categories : Misc

disable web security on mobile browser ios
I'm not aware of any official ways to do this. If you rely on cookies, the alternative would be to read every header to every response and manually assign received cookies to different domains (the downside to this is that you must know the other domains to be used beforehand). For handling cookies, check out [NSHTTPCookieStorage sharedHTTPCookieStorage], the default storage for native apps.

Categories : Iphone

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

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

browser for creating mobile game app
A game as a native app would usually be written in a much more efficient language than javascript, for example Java on Android or Objective-C on iOS. Javascript is usually interpreted as it is run (as far as I know), and this affects the performance. Also, while you can obfuscate javascript to hide the implementation (if you want to protect your code), it isn't as effective as compiling a native app (I don't know how hard it is to reverse-engineer Java though). However, WebGL is becoming more popular, and lets javascript code use hardware acceleration to accelerate graphics. When this is well supported on mobile devices, it might be feasible to make a complex game in the web browser. It certainly makes it more portable, and you could put it in a native WebView (or similar), for it to act

Categories : Javascript

detect request from mobile app not from browser in php
I assume that you're using an NSURLRequest somewhere... Create a mutable request NSMutableURLRequest and set the header you want to check for in the PHP (using addValue:forHTTPHeaderField:).

Categories : Iphone

How to create floor plans that work nice with mobile and desktop browsers?
I built a floorplan application that sounds similar to what you're creating. Feel free to look at the source code and create your own fork. Hopefully you can pull some inspiration from it. The code most relevant to SVG manipulation is Map.js, so you may want to start there. One of the map SVGs is stored in mv.svg. Sadly, I can't point you to the live instance this is running on because it's on an internal HR server. Architecture notes walls and room names are stored in an SVG file. generated in Adobe Illustrator, which can import AutoCAD DWG SVG edited by hand to include a JavaScript array of seat coordinates on page load, server-side templating inserts the SVG into the HTML source otherwise, if SVG is loaded using an <object> or <image> tag or CSS background-image, you

Categories : Javascript

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 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

BlackBerry 10 browser submits form using browser submit button when using preventDefault
I have worked around this by adding action="javascript:void(0);" to you form (see updated fiddle http://jsfiddle.net/e4AHZ/11/). I do not know if this is good enough but action="javascript:void(0);" is in fact part of a solution given to a similar question. <form method="post" action="javascript:void(0);"> <input type="text" name="field1" value="some msg" /> <input type="text" name="field2" value="some msg" /> <input type="submit" /> </form>

Categories : Javascript

How to open links in default browser inside InApp Browser on PhoneGap
I have been using this as a workaround (opening an inappbrowser instance): // Image zoom $('#container').on('tap', '#content.cmscontent img', function() { var browser = window.open((navigator.userAgent.indexOf('Android') != -1 ? 'file:///android_asset/www/' : '') + encodeURI($(this).attr('src')), '_blank', 'location=no,toolbar=yes,enableViewportScale=yes,transitionstyle=crossdissolve'); }); See I added (navigator.userAgent.indexOf('Android') != -1 ? 'file:///android_asset/www/' : '') as a prefix before the url. Now it detects when you're app is on Android and adds the local URL in front of it.

Categories : Android

Mobile Browser fires click/tap event twice
I had the same problem. My solution was to add return false; at the end of the event-handler. Example: $(document).on("click, tap", ".autoTeam", function(event){ // do thing return false; // double event fix });

Categories : Android

php login form not working in mobile browser
Change to <input type="submit" style="font-size:30px;" name="login" value="Login" /> instead of <button type="submit" style="font-size:30px;" name="login">Login</button>

Categories : PHP

A way to reset mobile browser zoom onSubmit?
For safari on mobile you cant use maximum-scale=1.0 then reset it back to maximum-scale=10.0. This will make it so users are only allowed to zoom in x1. Then you reset it back to x10.

Categories : Javascript



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