google-chrome

Extra padding in Chrome and Safari

Safari and Chrome seem to be adding extra padding/margins in regards to the text within the boxes at one of the pages within my website. What can I do to make it appear the same way it does in Firefox and IE? ...

Cross browser (chrome/firefox) trying to get top-pos defined in percentage as pixels

I have a problem whit cross browser output, I'm trying to get the top and left css attribute of a div, but firefox gives me the exact pixel position and Chrome give me the percentage. Example: http://web.cinaird.se/pdf/test.htm CSS #mix{ position:absolute; top: 10px; left: 45%; background-color:#f0f; } jQuery css ...

CSS margin collapsing?

I'm working with Google Chrome on OS X, and I seem to be running into a margin collapse issue. I have two divs stacked on top of each other, both with a margin-top of 2px and a margin-bottom of 5px, and both with a 1px border. According to my arithmetic, there should be 1+1+2+5=7px of space between the "content" areas of the divs, since ...

Get text (not url) from address bar in Google Chrome

I want to retrieve the text that the user has typed into the currently visible address bar, using Javascript. This is for google chrome only. Is this possible? I know you can get the document URL via window.location.href, but I am unable to locate any javascript pertaining to current code inside the address bar/omnibar. Thank you for t...

Ajax cross domain in Safari/Chrome

Hi Folks, Firefox & IE's do have browser-settings where an user may allow those forbidden cross domain calls. My question: Is there a similar setting/option in Safari's and/or Chrome browsers? Kind Regards --Andy ...

How to getting browser current locale preference using javascript?

Does anyone know how to obtain the browser culture from firefox and google chrome using javascript? Note: This is an asp.net 3.5 web application. The requirement is to try and set the applications display culture based on the browser culture. I have found very few bits and pieces of information for the other browsers but they do not ...

Changing <object> height and width works in Chrome but not Firefox or IE. Why?

I am making a site with two Youtube videos. These videos use the raw embed code from Youtube. The site's design doesn't work with any of the default Youtube sizes, so I am writing code to automatically resize the video. Here is my code. There will never be more than these two tags on the page, otherwise I'd do a better job selecting t...

looking for overview of readystate and browsers

I'm finding a lot of problems with trying to determine readyState between IE8, FF3, and Chrome. so far this is what I find: Chrome, FF do not fire an event for .onReadyStateChanged Chrome, FF support .onLoad IE8 supports .onReadyStateChanged, but does not support .onLoad IE8 has also returned loaded, and complete. Mostly it states loa...

Webkit ondrop event while dragging

I'm trying to drag one img and so it fires ondragenter for IE and dragover event for standard browsers, on IE and FF after the user drags it could fire ondrop event however on Webkit based (chrome and safari), i need to cancel or preventDefault() on the dragover event, doing that so will disable the dragging. Any idea on solving this? Th...

PHP sessions: pageview count double incrementing in firefox3 and chrome4

I have some basic pageview incrementing code set up on a LAMP server (see code below). The code starts a session, checks if pageviews is set, increments it if not and prints the variable. The page links to itself with a single href, and clicking on that link causes the pageviews count shown on screen to increment by one. It works correc...

ASP.Net FileUpload not working in google chrome

ASP.Net FileUpload not working in google chrome.It shows validation error,even after choosing right file type.Any solution ? Here is a code : <asp:FileUpload ID="FU1" runat="server" /> <asp:RegularExpressionValidator id="FileUpLoadValidator" runat="server" ErrorMessage="Upload jpg and gif only." ValidationExpressio...

Extremely strange glitch in Chrome - parses contents of string!

Okay - this is the dumbest glitch I have seen in a while: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type='text/javascript'> var data = "</script>"; </script> </head> <body> This...

Pass variables to current tab via chrome extension

I am writing my first chrome extension, and I want to pass a variable to the currently opened tab and manipulate the DOM with it. My extension has a button, and when clicked, is executing this code: chrome.tabs.getSelected(null, function(tab) { chrome.tabs.executeScript(tab.id, { file: 'tabscript.js' }); }); This works fine, but ...

How can I use Performance Counters in C# to monitor 4 processes with the same name?

I'm trying to create a performance counter that can monitor the performance time of applications, one of which is Google Chrome. However, I notice that the performance time I get for chrome is unnaturally low - I look under the task-manager to realize my problem that chrome has more than one process running under the exact same name, but...

In Google Chrome, how do I bring an existing popup window to the front using javascript from the parent window?

I would like to have a button on a web page with the following behavior: On the first click, open a pop-up. On later clicks, if the pop-up is still open, just bring it to the front. If not, re-open. The below code works in Firefox (Mac & Windows), Safari (Mac & Windows), and IE8. (I have not yet tested IE6 or IE7.) However, in Goo...

Chrome's loading indicator keeps spinning during XMLHttpRequest

I'm writing an AJAX web app that uses Comet/Long Polling to keep the web page up to date, and I noticed in Chrome, it treats the page as if it's always loading (icon for the tab keeps spinning). I thought this was normal for Google Chrome + Ajax because even Google Wave had this behaviour. Well today I noticed that Google Wave no longe...

Help making userscript work in chrome

I've written a userscript for Gmail : Pimp.my.Gmail & i'd like it to be compatible with Google Chrome too. Now i have tried a couple of things, to the best of my Javascript knowledge (which is very weak) & have been successful up-to a certain extent, though im not sure if it's the right way. Here's what i tried, to make it work in Chro...

controlling css with javascript works with mozilla but not with webkit based browsers

Im having problems with a css text variable in this javascript with webkit based browsers(Chrome & Safari) but it works in firefox 3.6 importScript('User:Gerbrant/hidePane.js');//Special thanks to Gerbrant for this wonderful script function addGlobalStyle(css) { var head = document.getElementsByTagName('head')[0]; if (!head) { r...

Jquery+Plugins randomly crashes on load

This happens about in about 40-60% of loads, both in FF and chrome, though slightly differently. I'm somewhat new to js, and have no clue to why this would happen randomly. Any ideas? Here's one readout, they vary.. Usually jquery-min and/or jquery ui are listed as culprits.. Uncaught SyntaxError: Unexpected string :3000/public/javascr...

jscript not loading in safari and chrome, while work in IE, fire fox, multiple dependency selection form page

hi everyone, this is my 1st post here in this community forum, just would like to say "HI" to everyone. i would like to share with you my experience in developing multiple dependency selection form developed in java script, how this script works is that when 1st selection is selected, based on the value the user select, a second level s...