w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Disable Chrome two fingers back/forward swipe
It is only possible to disable this feature by disabling scrolling itself: With jQuery: ('body').on('wheel', function(e){ e.preventDefault(); }); Without jQuery: document.body.addEventListener('wheel', function(e){ e.preventDefault(); }); This code will work in Modern browsers but is not cross-browser tested. Also, MAJOR CAVEAT: if you still want the users to be able to scroll the page, you'll have to roll your own scrolling to make it all work.

Categories : Google Chrome

Show custom pop-up on back/forward button press of browsers
This is simple answer: you cannot! window.onbeforeunload only can return string! BTW firefox doesn't allow customized message. window.onbeforeunload = function (evt) { return "My message which make users not so happy!"; } If you want some kind of hacky workaround to make your users never come back to your site, you could see that: http://stackoverflow.com/a/16824414/1414562

Categories : Javascript

disable activity restarting on go back or forward
Since the elements are dynamically generated they are not stored anywhere You can try storing element data in the onPause() method and restoring them in onResume() method

Categories : Java

How would I build a Chrome extension to mimic Safari's back/forward page slide animation?
Unfortunately, you don't have access to such low level UI stuff in a Chrome extension. You would have to simulate the effect by injecting a content script into all tabs as they load and animate the entire document or body. This would add overhead to every page visited in the browser, but could potentially work.

Categories : Google Chrome

How to map Microsoft Visual Studio 2012 forward/back buttons to mouse forward/back buttons?
Found a nice Mouse navigation extension. Not sure if it only works exclusively on 2012, but it does work on 2012. http://visualstudiogallery.msdn.microsoft.com/87fb8c65-d1db-49e9-a068-d62a222a4ae7 If anyone interested in the link for the info I found on 2010 stuff, here it is: How do I edit Visual Studio's mouse shortcuts?

Categories : Visual Studio 2012

My web page's layout only works on Chrome. It looks messy on other browsers. How do I format layout on CSS to accommodate for all browsers?
This is broken in all browsers. Its too hard to see what you want to achieve. To get this done Draw boxes on a sheet of paper to represent each element on your page. This is a process called wireframing. It is like an architect's plan. It also acts like a map helps to stop you getting lost in your code. Using floated divs with colour backgrounds recreate the box layout you drew on the paper. Test it in all browsers Once the boxes are are layout in a grid you like replace them with your images and links. Otherwise add a few images. Test it it all browsers. Add links. Test again in all browsers. Then add the video frame. The idea is take small steps get the code to work then move on. That way you only have the last few lines of code to look for errors.

Categories : CSS

Sending keyboard shortcuts to chrome with Selenium and Ruby
I think you're just using a wrong keys combination. According to this: https://support.google.com/chrome/answer/171571?hl=en&ref_topic=25799, the shortcut to open Developer Tools is Ctrl-Shift-J on Linux and Windows and Cmd-Opt-I on Mac.

Categories : Ruby

Disabling browser back button works but first it browses back and then browses forward
In your javascript file, just put this at the top of the file (or on your _layout page): window.history.forward(); Every time the script is loaded, it will go forward. If it can't go forward, it does nothing. This essentially disables the back functionality.

Categories : Javascript

Printing pages on different Browsers
You can approach this in two ways: Browser extension Writing an extension for the browser(s) (at least Chrome and FireFox) will allow you to grab the current content as a bitmap you can use with canvas. This is probably the fastest option as the screen snapshot is created internally. Though, I am not sure if the browser snapshots client window or the full document so this need to be determined. Simulate the DOM tree There are libraries such as html2canvas and canvas2image that simulates the DOM tree and tries to render an approximate representation of the web page. There a couple of things to notice with this: It's relatively slow You may run into cross-origin restrictions in relation to images (work around is to use an image proxy) You cannot get content of "foreign objects" (Flas

Categories : Javascript

Chrome issue : Enable/Disable sorting on columns fails in chrome in GWT
The issue is resolved by deferring redrawHeaders() call Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { _table.redrawHeaders(); } }); }

Categories : Gwt

JavaScript Historic back/forward
Hashes. The simplest solution is to define an URL hash every time the user clicks on a button. For example: location.href = "#" + button.id; With that, you create a history entry, and the user can press back or forward in the browser. But how can you check when this happens? There's the hashchange event: window.onhashchange = function() { var state = location.hash.substring(1); // chomps the initial # ... }; Basing your code on the state variable, you can trigger your AJAX calls from there. By the way, you can change your code altogether, using links instead of buttons with an hash as the href property, which does not reload the page, but creates an history entry and fires the hashchange event. The hashchange event is supported by every modern browser (that support history

Categories : Javascript

HTML5 History API: go back and don't allow going forward (popState?)
Use virtual states A virtual state is a state that you explicity set as a "non displayable state": their main goal is to reset the forward states. I call these specific virtual states "removed" states. I have used that principle for several web applications, and it works perfectly. It's like pushing states that will not make your application move, but clear history State. history.pushState({removed:true}, 'yourcurrenttitle','yourcurrenturl'); On the popstate events, make your script NOT launch the usual behaviour if these removed states are encountered. Notes Any new pushState while being on a removed:true history.state should be transformed to a replaceState You will have to handle the problem of skipping these removed states if you allow your application to remove a state betw

Categories : Ajax

JavaScript and the browser's back/forward button
Well, for starters you'd have to avoid the client's navigation cache (often a back/forward doesn't actually pull the page back down). After that hurdle you can look at (ironically) using a session variable to store if it's been viewed [output] and only dump it to the page once. if that seems to much, you could just add a cookie check in the function so when it's run (and re-run) it checks for a cookie and, when absent, makes an alert and sets a cookie. Pseudocode: function showAlert(msg){ if (cookie[msg] == null){ // a cookie doesn't exist for this msg alert(msg); // alert the msg cookie[msg] = true; // set the cookie so the next pass is ignored } }

Categories : Javascript

Disable overflow scrolling on webkit-based browsers
This isn't an ideal solution, but I don't think a pure CSS solution exists to this problem (unfortunately), it makes me wonder whether this has been logged as a bug with the Chrome team. jQuery should be as follows: $('input').on('mousedown', function(e){ $(e.target).focus(); e.preventDefault(); }); (I know I shouldn't assume you're using jQuery, if needed I can provide you a pure JS solution, it'll just be more complicated). Fiddle: http://jsfiddle.net/jzb5a/ EDIT: Apparently this is a known bug (https://bugs.webkit.org/show_bug.cgi?id=114384) it's dissapointing that four months on there still hasn't been a fix though.

Categories : CSS

disable seek forward in jwplayer in mobile browser not working
Try this below script. var maxPlayPosition = 0.0; var seeking = false; jwplayer().onTime(function(event) { if (!seeking) { maxPlayPosition = Math.max(event.position, maxPlayPosition); } }).onPlaylistItem(function() { maxPlayPosition = 0.0; }).onSeek(function (event) { if (!seeking) { if (event.offset > maxPlayPosition) { seeking = true; setTimeout(function () { jwplayer().seek(maxPlayPosition); }, 100); } } else { seeking

Categories : Jquery

How to disable sticky highlight for repeat isearch forward / backward
Using the source code of isearch.el as a guide, the following OSX additional key assignments eliminate the problem with sticky highlight as outlined in the question above. (define-key global-map [?s-f] 'isearch-forward) (define-key esc-map [?s-f] 'isearch-forward-regexp) (define-key minibuffer-local-isearch-map [?s-f] 'isearch-forward-exit-minibuffer) (define-key isearch-mode-map [?s-f] 'isearch-repeat-forward) (define-key global-map [?s-F] 'isearch-backward) (define-key esc-map [?s-F] 'isearch-backward-regexp) (define-key minibuffer-local-isearch-map [?s-F] 'isearch-reverse-exit-minibuffer) (define-key isearch-mode-map [?s-F] 'isearch-repeat-backward)

Categories : Emacs

This works in IE but not chrome. How do I get it to work in all browsers?
I think this change is what you want, I don't believe children are allowed within a textarea Replaceable character data In documents in the HTML syntax, the title and textarea elements can contain replaceable character data. Replaceable character data can contain the following: text, optionally including "<" characters character references Replaceable character data has the following restrictions: must not contain any ambiguous ampersands must not contain any occurrences of the string "", or "/". textarea.style.color = textColor; //element.appendChild(text); //textarea.appendChild(element); textarea.value = mytext;

Categories : Javascript

Browsers back button click with confirm box
window.onbeforeunload = function() { return "Leaving this page will reset the wizard"; }; This would help you. DEMO

Categories : Javascript

call back jquery function in IE, 8, 7 browsers
I found the problem, i was passing jquery class "ok_button" in jquery dialog and it was creating problem in IE 8 and IE 7 for some reason .... $("#MessageBox").dialog({ title: messageTitle, buttons: [{ text: 'Ok', class: 'OkButton', click: function () { $(this).dialog('close'); } }] }) solution : function displayMessage(message, messageTitle) { $("#MessageBox").text(message); $("#MessageBox").dialog({ title: messageTitle, buttons: [{ text: 'Ok', click: function () { $(this).dialog('close'); } }] }); }

Categories : Javascript

Back and forward browser buttons in an app using requireJS and AngularJS
The back buttons work for me when I try that. Check this HTML: <body ng-app="app"> <div> <ul> <li><a href="#/">Home</a></li> <li><a href="#/about">About</a></li> </ul> <div ng-view=""></div> </div> </body> And this JavaScript: angular.module('app',['ngResource']); angular.module('app').config(function($routeProvider){ $routeProvider.when('/index',{ template: "HELLO {{name}}", controller: "IndexCtrl" }).when('/about',{ template: "HELLO {{name}}", controller: "AboutCtrl" }).otherwise({ template:'HELLO {{name}}', controller: "IndexCtrl" }) }); angular.module('app').controller('IndexCtrl',function($

Categories : Angularjs

Is it possible to move forward and back in audio duration Soundmanger2
Yes you can do that, use jquery UI slider or HTML5 range slider, var audio; soundManager.url = 'assets/swf/'; //on play $(document).delegate('.play','click',function(e){ audio = soundManager.createSound({ id:'Mp3Songs', url:"index.php/.....mp3", whileplaying:function(){ duration = this.duration; pos = this.position; $( "#seekBar" ).slider({ min:0, max:duration, value:pos }); } }); audio.play(); }); $( "#seekBar" ).slider({ orientation: "horizontal", range: "min", slide:function(event, ui){ if(audio != undefined){ audio.setPosition(ui.value); } } });

Categories : Jquery

Target browser back and forward buttons individually
You don't need to track back/forward or history if you implement it correctly. Each XML file you load should be given a unique id, simply replace forward slashes with underscores and remember you shouldn't use underscores for actual urls, you use dashes instead. Presuming you don't have a url scheme that would make using Windows 8 seem non-homicidal by comparison you simply check for the id requested. You can see how popstate works on my site... http://www.jabcreations.com/blog/ Do a Ctrl+f and look at the code starting around the line... window.onclick = function(e) ...here... http://www.jabcreations.com/scripts/index.js If you're using Firebug expand the #liquid (literally <body><div id="body"><div id="content"><div id"liquid"> in my XHTML). If you get lo

Categories : Javascript

Restrict user to refresh and back,forward in any browser
Try dis to disbale back button. <SCRIPT type="text/javascript"> window.history.forward(); function noBack() { window.history.forward(); } </SCRIPT> </HEAD> <BODY onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload=""> Or we can remove these from the tool bar window.open ("URL", "mywindow","status=1,toolbar=0");

Categories : Jquery

CSS3 Animations are working in all browsers but Chrome
CSS3 filter: brightness should be specified as a value between 0 and 1, where 0 is the darkest (black) and 1 is the brightest. You are seeing black boxes because brightness 0 means 0% brightness. What you want is this: .brighten img { -webkit-filter: brightness(1); -moz-filter: brightness(1); -o-filter: brightness(1); -ms-filter: brightness(1); filter: brightness(1); } .brighten img:hover { -webkit-filter: brightness(.75); -moz-filter: brightness(.75); -o-filter: brightness(.75); -ms-filter: brightness(.75); filter: brightness(.75); } PS: I put .75 (AKA 75%) because I'm assuming that's what you meant by -25%, but you can obviously put any number. EDIT: Something to keep in mind: It is my understanding that CSS3 filters are

Categories : HTML

Openshift https bug occurs on all browsers not on chrome only
I created a sample ruby-1.9 app here: http://naruto-konoha.rhcloud.com . It doesn't force HTTPS for me on both Firefox and Chrome. Could you visit this and check if it forces HTTPS for you? Alternatively, is the issue you're experiencing only the case with a particular app? If yes, could you check if it's something in your code that forces HTTPS? Hope that helps.

Categories : Http

:after pseudo not working in all modern browsers except Chrome
That's because you aren't supposed to use pseudo-elements on replaced content as its content isn't defined by CSS, but rather the OS in most cases (for form elements). I would imagine the implementations would vary amongst browsers because of this. From the Generated and Replaced Content Module: Replaced elements do not have '::before' and '::after' pseudo-elements; the 'content' property in the case of replaced content replaces the entire contents of the element's box.

Categories : HTML

Detecting use of back/forward button inside Sammy.js application
You can't know that precisely. All you can find out is wether the navigation event was received from inside the application (click on a link handled by Sammy, form submited , action in your JS ...) or if the navigation event came from the "outside" Back Button, Forward button, change in the URL bar, ...

Categories : Javascript

BFcache disabled by unload events (Back-Forward cache)
In order to enable BFCache you need to remove beforeunload event listener. It should be the same listener which was added by Piwik code, otherwise removeEventListener will do nothing. That listener is unreachable outside of the Piwik's source, so one does not simply remove it. But, if you have a possibility to insert code before the Piwik, you can try to override addEventListener, track added handlers and expose function to remove all tracked handlers at once.

Categories : Javascript

Browser back and forward button events, without a jQuery plugin
window.addEventListener("popstate", function(e) { // if a back or forward button is clicked // do whatever } Works only in HTML5-enabled browsers, though. For other browsers support, look into History.js

Categories : Javascript

Back and forward buttons not rendering templates in ember rails app
I'm not a rails developer but try doing something like this for the simple model/route setup you show above App.Group = Ember.Object.extend().reopenClass groups: [] find: -> $.ajax url: "/api/groups/" type: "GET" cache: false dataType: "json" beforeSend: => @groups.clear() success: (results) => [@groups.addObject(App.Group.create(result)) for result in results] error: => alert "error: failed to load the available groups" @groups App.Router.map -> @resource "groups", path: "/", -> @route "group", path: "/:group_id"

Categories : Ruby On Rails

Google Chrome clears :after-element left, all other browsers not
Set a explicit width to .btn_container. That'll solve your problem. Here's the fiddle http://jsfiddle.net/K7y4U/6/ I did: .btn-container .btn { width: 90px; }

Categories : CSS

How to prevent browser's forward button on chrome from submitting a form?
Generate a value and put that inside a hidden field. If the user submits the form store that value (must be unique). If one tries to submit the form again with the same generated value, then do not execute your insert or update.

Categories : PHP

Browsers back button is causing issues with hidden field
The page is not loaded again if you click the "back" button, the cached page content is shown. That is, the page as the state of it was the last time you visited it. You could reset the event_num counter on $(document).ready or on a document unload event, then you will get the expected behaviour.

Categories : Javascript

LMERConvenienceFunctions error on back and forward fitting functions: model not a mer object
You are using an (older) version of the overhauled lme4 package that returns merMod objects instead of mer objects, and hence is not compatible with LMERConvenienceFunctions. I get the same error when using the soon-to-be-released version 1.0-4. If I install the latest version from CRAN instead (0.999999-2), no errors arise. I suggest removing your current lme4 and installing the latest from CRAN, and checking its version: > detach("package:lme4",unload=TRUE) > remove.packages("lme4") > install.packages("lme4") > packageVersion("lme4") [1] ‘0.999999.2’ This should fix your problems. Be aware, however, that you will lose the advantages of the new version. Also, in the coming days the new lme4 should appear on CRAN, breaking LMERConvenienceFunctions again if you update y

Categories : R

HTML/PHP code working in all browsers but Google Chrome and Safari
Here's your problem: <a onclick="document.getElementById('Consultar').submit()"> Every row has its own form, but they all have the id Consultar. So, the getElementById() gets the first row. I'm surprised that the other rows would work in any browser. If the a is always a direct child of the form, you could dispense with the id entirely and just do: <a onclick="this.parentNode.submit()">

Categories : PHP

Send an outlook attachment from firefox,chrome and safari,is it anyway for such browsers except IE
There is no way to do that. There a some browser plugins that let you use ActiveX controls, but I don't think anything is available that lets you use regular COM objects. In theory, you can create a browser plugin that exposes COM objects as native JScript object (I did that for FF 3.6), but it is such a pain...

Categories : Javascript

Youtube embeded video not working in all my browsers: FireFox, IE and Chrome
Youtube uses //www to be compliant if you're using both http:// and https:// - it works fine if you run it via a webserver locally, ie WAMP on Windows, but not if you just open the file in the browser with the file:// Reference - Two forward slashes in a url/src/href attribute

Categories : HTML

Does not work correctly in browsers jquery sorting (Opera, Chrome)
change this code: $('#all_elements .element').sort(sortDescending).appendTo('#all_elements'); to $('#all_elements .element').sortDescending().appendTo('#all_elements');

Categories : Jquery

facebook app does not load in google chrome. Loads in all browsers ie until the works
I had this code and it didn't work (only for fans) in Chrome either. For non fans it displayed the image correctly. I just changed my redirects to a HTTPS and it has worked! :) It looks like Chrome has issues with redirects to http. Just add an "s" to all of your links and it should work. Be aware of hidden redirects, if you have a parameter URL or something like that, there you need to add the "s" twice: at the beginning (https://www.myweb.com/r.php?) and in the middle (&url=https%3A//www.myweb.es) hope it helps! An example: <?php require 'facebook.php'; $app_id = "384609344916003"; $app_secret = "f615dfb4c787d05d5f1a2fbefd11cadc"; $facebook = new Facebook(array( 'appId' => $app_id, 'secret' => $app_secret, 'cookie' => true )); $signed_requ

Categories : Misc

JQuery Mobile - Back and forward browser buttons fire the pageinit event
EDITED: It seems that when using a multipage template approach (single html with all pages included) then pageinit is fired once since the pages are loaded in DOM and remain there when transitioning between pages. However when using multiple pages and navigating though Ajax you will notice that the pages contain an attribute data-external-page="true" except the first page. The first page is always cached in DOM even if you're using domCache false. But the pages except the first page are loaded and cleaned out after you leave them. That's why pageinit is fired on back/forward button clicks. The domCache sets whether to keep the page in the DOM after the user has navigated away from it. You can read about it on jQM docs. By default the domCache option's value is false. Adding: $(document

Categories : Jquery



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