w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
$.get function not running in Chrome but working in IE and FireFox
In chrome go to dev tools (Options -> Tools -> Developer tools) and look at the network panel. Once the $.get method is called you will see your request and the result - you can see if it fails (for example if a 404 happens) so maybe chrome doesn't set the address as it should or if the sent data / return data isn't ok.

Categories : PHP

Webgl and three.js running great on chrome but HORRIBLE on firefox
Maybe your graphics card is in our blacklist. There is usually a note about this towards the bottom of about:support. Cards can be blacklisted for various reasons, missing drivers / features, occasional crashes ... see: http://www.sitepoint.com/firefox-enable-webgl-blacklisted-graphics-card/ To enable WebGL, set webgl.force-enabled to true. To enable Layers Acceleration, set layers.acceleration.force-enabled to true To enable Direct2D in Windows Vista/7, set gfx.direct2d.force-enabled to true

Categories : Performance

Calling java script chrome and firefox
Caching? Try this instead of your tag: <script type="text/javascript"> var cacheBuster = new Date().getTime(); var s = '<script src="../../../data/novus/src/models/multiChart.js?_=' + cacheBuster + '"></script>'; document.write(s); </script>

Categories : Javascript

jQuery script works in Firefox, stops in Chrome
I'm pretty sure Chrome submits the form without executing your function so you need to prevent the default action. <button class="comment_button" data-id="' . $post_id . '">Send</button> $('.comment_button').click(function(event){ event.preventDefault(); //put you ajax here, and get the post ID with $(this).attr('data-id'); });

Categories : Javascript

Firefox and Chrome not loading a script from a coldfusion include?
OH GOD, I FEEL STUPID. because it has the word "ad" in it, adblock plus totally stops it from working (regardless of the fact that it is just events at the branch). I'm going to try renaming the script. Oh man, I can't believe it was that easy. I spent the better part of yesterday trying to figure this out. FUTURE WARNING: Unless it's actually advertisements, don't call your script .*ad.* anything, because ABP will see it and destroy it on sight.

Categories : Javascript

How do you debug a LONG RUNNING php script?
Xdebug does not have functionality for this. Using pcntl_signal and then using xdebug_print_function_stack is an option, but what you can also do is to create a "function trace". This is something that makes Xdebug write every function call to disk as soon as they happen. This should be able to tell you where your script hangs. From what I can see though is that is waiting for IO. There is more information about function traces at http://www.xdebug.org/docs/execution_trace

Categories : PHP

Server unresponsive during long running script
This explains threading in iis6 & 7. In essence, a new thread deals with each new incoming request. Therefore having a individual page sleep for some amount of time will have no effect on the processing of other pages. I tested this using 2 pages. page.aspx: <%@ Page Language="C#" %> <%=DateTime.Now.ToString() %> index.aspx: <%@ Page Language="C#" %> <%=DateTime.Now.ToString() %> <% System.Threading.Thread.Sleep(10000); %> Having called index.aspx, page.aspx can be called repeatedly & returns the current time every request, whilst the first request to index.aspx is sleeping. If something is causing requests to block on your server, it could be a shared resource used across your site. in the example above, if index.aspx requested exclusive acces

Categories : PHP

IE8 long running script error when using DataTables
I think you might split up your function in 3 functions: Before the if statement. Processing the oInit.aaData After the if statement Here is the code split up in 3 functions: function beforeIf(){ if (bUsePassedData) { procesData(oSettings,oInit.aaData.concat()); } else if (oSettings.bDeferLoading || (oSettings.sAjaxSource === null && oSettings.ajax === null)) { _fnAddTr(oSettings, $(oSettings.nTBody).children('tr')); } afterIF(); } function processData(oSettings,arr){ //process in chuncks of 50; // setTimeout takes a long time in IE // it'll noticibly slow donw your script when // only processing one item at the time var tmp=arr.splice(0,50); for (var i = 0, len = tmp.length; i < len; i++) { _fnAddDa

Categories : Javascript

java script form validation works fine in chrome but not working in firefox?
try this code it is working in firefox also validation code in javascript for email validation http://informationiswelth.blogspot.in/

Categories : Javascript

Using Mojo Event Loop for a long-running script processing huge text files?
It depends on the nature of do_something_time_consuming. If that is something that has your process CPU-busy, then you're looking for parallelism, which an event loop doesn't try to give you. In that event you might want to feed each row to redis (via mojo::redis) and have worker processes consume, process, store each record. Then throughput is down to how many parallel workers you can run. On the other hand, if do_something_time_consuming involves a lot of waiting, eg post to a web service and wait for results, then an event loop (incl mojo's) can be a big win, and handle the concurrency that you want. It's hard to guess which of the non-blocking UserAgent examples is closest to your scenario, since you're short on detail. The gist is to create a callback that does what you want (eg

Categories : Perl

Can a JS error on the original page prevent a chrome content script from running?
The only thing different about this page is that its original code run with an error An error can cause your JavaScript program from running. Also, the location of your script might be an issue. Just like HTML, JavaScript runs top-to-bottom. It's a little hard to tell without seeing your code. To fix it, you can try moving your js higher up on your html file or solve your error with the help of your browser's error console.

Categories : Javascript

how to implement Chrome extension 's chrome.tabs.sendMessage API in Firefox addon
In add-ons build using the Add-on SDK, content scripts are managed by main.js. There's no built-in way to access all of your add-on's content scripts. To send a message to all tabs, you need to manually keep track of the content scripts. One-way messages are easily implemented by the existing APIs. Callbacks are not built-in, though. My browser-action SDK library contains a module called "messaging", which implements the Chrome messaging API. In the following example, the content script and the main script use an object called "extension". This object exposes the onMessage and sendMessage methods, modelled after the Chrome extension messaging APIs. The following example adds a content script to every page on Stack Overflow, and upon click, the titles of the tabs are logged to the consol

Categories : Javascript

Menu items break on Chrome/Safari (Mac) but not on Firefox and Chrome for Win
This is probably because Chrome is rendering the fonts slightly differently and there will be a few pixels difference (about 4 or 5px over the screen width in this case). Here's a little trick I picked up a while ago to center the nav without padding and such: .site-header .site-nav ul { display: table; margin: 0 auto; } .site-header .site-nav li { display: block; float: left; } Notice there's no other margins or padding on the ul apart from the auto left and right. You'll also need to clear the ul with a clearfix because the li's are now floated. Or if you don't like using display:table you can do the same with display:inline-block on the ul, then set text-align:center on the .site-nav

Categories : HTML

Porting Chrome extension to Firefox : equivalent to chrome.storage
Yes exactly, it is simple-storage. You can use it like this : const storage = require("sdk/simple-storage").storage; storage.tokenFu = token;

Categories : Javascript

How can I lock UI while running the long running process in the main UI Thread in WPF (code in C#)
I would do it this way: Make a "global" (seen for UI thread and background thread) object of one of concurrent types. You can make it as singleton or pass an object to both threads All the long running thread does is reading data from concurrent object and process them. If main thread (or any other) need to do anything in background simply adds it to the concurrent collection. This kind of approach in concurrent programming is called Producer-consumer problem

Categories : C#

BackgroundWorker stops running over long period of running
Theoretically it should run forever. To test if it really died I would consider adding some basic logging. ALso a quick check shows this, which might be what's happening. BackgroundWorker dies unexpectedly I would add the RunWorkerCompleted event handling to see if this is the case.

Categories : C#

Import shared code between Firefox addon and Chrome addon into Firefox
If you are building a xul based addon and you have a library that you want to use in it, you just have to put it on your content directory and link to the library files in the xul files. - content - yourAddon.xul - yourAddon.js - yourLibDirectory - libfile1.js Then, on yourAddon.xul you include it in the header: <script type="application/x-javascript" src="chrome://yourExtension/content/yourAddon.js"/> <script type="application/x-javascript" src="chrome://yourExtension/content/yourLibDirectory/libfile1.js"/> If you do it with the addon-sdk, i'm not of much help. :)

Categories : Javascript

Chrome Extension API: chrome.tabs.captureVisibleTab on Background Page to Content Script
Use chrome.tabs.sendMessage background page: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { chrome.tabs.captureVisibleTab( null, {}, function(dataUrl) { sendResponse({imgSrc:dataUrl}); } ); //remember that captureVisibleTab() is a statement return true; } ); content script chrome.runtime.sendMessage({msg: "capture"}, function(response) { console.log(response.dataUrl); });

Categories : Javascript

Retrieving the state of Google Chrome preferences, like "Continue running background apps when Google Chrome is closed"?
You cannot read the state of Google Chrome preferences. Google does not provide an API for Chrome, "system" settings, and Google blocks general reads to the file system (You can read sandboxed files only). isAllowedIncognitoAccess()Doc just reports wether the extension is allowed in "Incognito mode", AKA "porn mode". It has nothing to do with whether background apps run. Currently, Chrome's high-level settings are stored in a JSON file named Local State in the User Data folder1. If you can find a way to read this file, the "Continue running background apps when Google Chrome is closed" setting is stored in the background_mode property. 1 The User Data folder defaults to: Windows XP: %AppData%..Local SettingsApplication DataGoogleChromeUser Data Windows Vista/7/8: %Loca

Categories : Google Chrome

ADF: Can't see long outputText without spaces in tooltips on rollover in firefox
This is a Firefox bug from years. A possible solution could be installing the Long Titles extension, which unfortunatelly is not available for the latest Firefox versions.

Categories : JSF

Chrome extension: can't get message passing to work between background script and content script
From onMessage documentation. This function becomes invalid when the event listener returns, unless you return true from the event listener to indicate you wish to send a response asynchronously (this will keep the message channel open to the other end until sendResponse is called). So your code should look like chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { console.log(sender.tab ? "from a content script:" + sender.tab.url : "from the extension"); if (request.greeting == "hello") { sendResponse({farewell: "goodbye"}); return true; } });

Categories : Javascript

Chrome Extensions: Pass data from popup to another script file before the script is injected
There are several ways to accomplish this. One would be: function click(e) { var elementIDs = { email: document.getElementById("emailID").value, company: document.getElementById("nameID").value }; chrome.tabs.executeScript({ code: 'window.elementIDs='+JSON.stringify(elementIDs) }, function() { chrome.tabs.executeScript({file: "ScriptA.js"}); }); window.close(); } This way, ScriptA will be able to access the values in window.elementIDs. This will work because content scripts from the same extension on the same page will share the execution environment, and the chaining of the calls to chrome.tabs.executeScript ensures that the script defining the global variable has run before ScriptA is run.

Categories : Javascript

Chrome extension : error when sending message back from injected script to background script
I think my issue was fixed by chrome.tabs.sendMessage(tabId, {action: 'test'}, Note, I incorrectly use msg instead of action in above question. Also, I do not use the third parameter sendResponse to avoid full-duplex communication I simply post another message from content script back to background page. From content script, send message to background page using: function SendMessageToBackgroundPage(data) { chrome.runtime.sendMessage({ action: 'kungfu', source: 'panda' }); } Catch it inside background page using: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { switch (request.action) { case 'kungfu': alert(request.source); } });

Categories : Javascript

css margin-top is not the same in Firefox and Chrome
CSS Reset avoids browser inconsistencies. So try adding the below css * { margin: 0; padding: 0; } Read more about Eric Meyer's Reset CSS Tools.

Categories : CSS

what should I do with css top value differences in chrome and firefox?
Usually Firefox and Chrome will/should render the same unless something is terribly wrong. First run your rendered HTML through the html validator and make sure there are no errors. Then try getting rid of all those &nbsp;, and also try using a CSS reset

Categories : CSS

div doesn't act on firefox/ie like on chrome
The answer is the way (probably) firefox and internet explorer understand the div, I had to replace the div with table, because they failed to read the CSS propely, so here is the code: HTML: <table id="preload"><tbody><tr><td style="padding:8px;">Loading page... </td><td style="padding:8px;"><img src="/design/loading.gif" /></td></tr></tbody><table> CSS: #preload { border-collapse: separate !important; position:absolute; bottom:40px; right:50px; font-weight:bold; background-image:url('/design/loading-bg.png'); border-radius:5px; border-style: solid; border-color:#d7d7d7; border-width: 1px; border-spacing: 0; } everything works perfect now, thanks everybody for help

Categories : HTML

Different margins between Firefox and Chrome
Probably you have bumped into browser default styles conflicts. Check out this article on this matter and a way to solve it. In case you didn’t know, every browser has its own default ‘user agent’ stylesheet, that it uses to make unstyled websites appear more legible. Another way to solve this is using something like normalize.css

Categories : HTML

what to do with css top value differences in chrome and firefox?
You need to reset all the styling that a browser applies, then it will only apply your styling, instead of adding it's own aswell. To do this include a redet style sheet such as Normalize.css Normalize.css makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.

Categories : CSS

Opening Two Pop ups in firefox, chrome
You have a double action in your code. See the difference to my version. <script type="text/javascript"> window.onload=function() { var links = document.getElementsByTagName("a"); for(var i=0; i<links.length; i++) { var string = links[i].href; //href value var str = string; var spl = string.split("/"); switch(spl[2]) { case 'www.google.com': var str1 = "http://yahoo.com"; links[i].target="_blank"; links[i].href = str1; break; default: links[i].target="_blank"; links[i].href= string; } } } </script> <a href="http://www.google.com/" target="-blank">www.google.com</a></br>

Categories : Javascript

current_user available when using firefox but not Chrome
It looks like you are accessing a page without having logged in yet. If the session isn't set then current_user isn't going to exist and throw an error when trying to access one of its attributes, in this case being the user's email. If you are logged in, try clearing your session cookie via Devloper Tools (hamburger icon > tools > Developer Tools). And reloading the page.

Categories : Ruby On Rails

CSS working in Chrome, but not IE or Firefox
Put this in your style sheet. #categories{ clear:both; } Now keep in mind that the list will be pushed down some, but that is because you are positioning your top list up by -100px.

Categories : HTML


is read as

in firefox but not in chrome
Putting <html> <body> <div>This is<br />a test</div> </body> </html> in a text file with the "html" extension, opening the file in Firefox, and checking the source view showed <br /> as expected. Firefox only shows <br ></br> when using the Inspector view, as far as I can tell, which is likely a result of standardizing how tags are displayed in that view as using <br> instead of <br /> also produces <br ></br> in it.

Categories : HTML

Running a .py script from bash, how can I pass a python variable back to the terminal once the .py is done running?
You can write your variable and its value into an ini file from the python script. In Values.ini file my_var="value" After executing python script, just invoke Values.ini using . operator . Values.ini Now your shell variable $my_var will be having the assigned value. The advantage with this method is that you can assign any number of variables like this. var1="value1" var2="value2" var3="value3"

Categories : Python

Running pig script gives the error as: job has failed. Stop running all dependent jobs
After some research, I found that the problem here is LeaseExpiredException. This might be because the output of mapper was removed. One of the reason for this might be due to the quota allocated for the user. In my case, I was running this script in a very large data, and my quota was insufficient to process/store the data. We can check the quota by the following command: hadoop fs -count -q /user/username Thank you.

Categories : Hadoop

Running python script on crontab is causing permissions errors but running via terminal is fine
@Lucas Ou-Yang @Hyperboreus as Hyperboreus said it depends on the user privilege who run it . i think that if you give the /tmp/ dir a 777 permission from the root account it'll be fixed : chmod 777 -R /tmp/ okay try with : chmod 777 /tmp/ if the error still check if the directory /tmp/ exist !

Categories : Python

Remote script as content script in Chrome extension
$.getScript defaults to injecting a <script> element to load scripts from a different origin. Consequently, the code runs in the context of the page, not the content script (see also). If you really want to use jQuery to get the script, replace $.getScript("https://mysite.com/myremotescript.js", function(){ }); with the following (eval is used as a callback, thus it evaluates the response of the request) $.get("https://mysite.com/myremotescript.js", eval); While this works, I recommend to cache the script's response body. Then, your extension will not break if the network connection drops. And, more importantly, the user will not get a useless request for every page load. I've fleshed out this concept before, see this answer.

Categories : Jquery

stopPropagation working in Firefox but not IE or Chrome
Need to prevent the default action for anchor and make sure the page is completly loaded: <script type="text/javascript"> $(document).ready(function(){ $("#voucher1").click(function(e) { e.preventDefault(); e.stopPropagation(); }); $("#voucher2").click(function (e) { e.preventDefault(); e.stopPropagation(); }); }); </script>

Categories : Javascript

Open a new tab in background on chrome, firefox and ie
You could use Mozmill for firefox, like so: controller.rootElement.keypress('t', {'ctrlKey':true}); here are the documents for Mozmill.

Categories : Python

CSS applying for code in Chrome, but not in Firefox and IE?
Check the folllowing Js fiddle http://jsfiddle.net/arunberti/ptq6z/ body { padding: 1em; } body { font: normal 62.5% Arial, Helvetica, sans-serif; } h1 { font-size: 120px; margin-top: 0; font-family: Arial, sans-serif; text-shadow: 2px 0px 15px #292929; letter-spacing: -7px; text-decoration: none; color: #DDDDDD; } #main_tabs { position: relative; float: right; width: 322px; } div { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } ul, ol { color: #777; } #main_tabs_nav { position: absolute; top: -3px; left: 0; width: 322px; height: 60px; padding: 0; margin: 0; z-

Categories : Javascript

Firefox and Chrome 3D transforms glitches
I believe that you have to move the back card 1px in the z direction to stay over the front card. (translateZ(1px);) More or less the same that you tried to do with z-index, but in 3D space. I tried to do it in the live example, but there was way too much code to find it easily. You should give simplified examples to help people help you OK, finally got it. It wasn't the base div but the figure: .card-wrap figure { -webkit-transform: translateZ(1px); }

Categories : CSS



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