google-chrome

How can I prevent WebKit browser to submit a form when enter is pressed in an input

When using a form with many text input, WebKit/Safari/Google Chrome submits the form when ''enter'' is pressed in any input element. Even if there is no submit input element and no onclick handler registered. See for instance this sample code: <html> <body> <form method="POST" action="."> <ul> <l...

Why isn't chrome running this javascript

When I run this in Chrome (ver 2), it doesn't return the string, but it works in Firefox (ver 3). Why is this? <html> <head> <script type="text/javascript"> function disp_prompt() { var name=prompt("Please enter your name","Harry Potter"); if (name!=null && name!="") { document.write("Hello " + name + "! How are you tod...

INVALID_NODE_TYPE_ERR in jQuery when doing multiple selectors on Chrome

I'm doing a jQuery multiple selector find: element.find("fieldset, input[type=hidden], input[type=text], :radio") and in Chrome version 1 it gives this error "INVALID_NODE_TYPE_ERR: DOM Range Exception 2" on line 722 of jquery's selector.js aRange.selectNode(a); in context: function(a, b) { var aRange = a.ownerDocument.create...

How to create hidden Firefox Extension?

Is it possible to create Firewox extension that will not shown in Extensions List? And so cannot be deinstalled manually? ...

Mozilla 3.0.8 and Chrome height in em bug workaround.

I've got a textarea inside a div: <div id="textareawrapper"> <textarea id="chat"></textarea> </div> ...and CSS: #textareawrapper { border 1px dashed pink; margin:0;padding:0; position: absolute;bottom: 0em;left:7.5em;right:7.5em;height: 7em; } #textareawrapper textarea {margin:0;padding:0;width: 100%;height:7em;} IE 7...

Safari and Chrome: problem editing input 'size' attribute on the fly

Hi, I have the following bit of code to create an automatically resized text input: // setup quick jump input $("#goto").keydown(function(e){ var size = $(this).val().length; // sanity if ( size < 1 ) { size = 1; } $(this).attr("size",size); // if enter then GOTO-> if ( e.keyCode == 13 ) { window.location.href =...

Can I pop up a confirmation dialog when the user is closing the window in Safari/Chrome?

In IE and FF, i can attach an event handler to onBeforeUnload, and by passing a string to a property of the event, the user will see a dialog asking him whether he wants to continue with the "unloading" (either closing the window or navigating away). Safari and Chrome don't support onBeforeUnload, and onUnload seems to be too late. Is t...

Controls "out of window/chrome" in WPF

Is there a way to have controls/images/etc "out of" the Window/Chrome (ie, Aero's glass) in WPF? An example of what I mean is the WPF Yahoo Messenger which was released (and then discontinued) awhile back. The WindowStyle looks like it is set to None, but AllowTransparencies/CanResize set to false/true respectively - and the avatar is ...

Facebook Connect button not showing up in Safari/Chrome

My implementation of Facebook Connect (just a simple login button, fb:login-button) works perfectly on Firefox and IE. But the same button is not showing up in Safari/Chrome (Webkit). Here's what's ironic. In my debugging effort, I saved the page (that contains fb:login-button) up as a static page and then load it in Safari. And the bu...

Site renders differently in CFM vs HTML on Chrome

Ok, so this is very odd. I have a site that I am breaking out into several ColdFusion documents for header/footer/etc. The footer of my site is affixed to the bottom using a jQuery plugin. When I go to the index.cfm page (in chrome) to view the results, the footer placement is off. I then "right-click...view source" and highlight all...

Does execCommand SaveAs work in firefox?

Why does this not work in ff/chrome? javascript: document.execCommand('SaveAs','true','http://www.google.com'); (used as a bookmarklet) ...

Weird Chrome prototype/jQuery conflict

We have an application with legacy code that relies on prototype, but we've found it to be too 'heavy' for most of the places we want to use it and and have found jQuery to be a better fit for how we work. So we're migrating to jQuery for new functionality. In the meantime we have several pages that need to load both libraries: <script...

How to open PDF file in Google Chrome in new tab?

I know it's not question about programming but I hope I'll find an answer for my problem. Is there a way how to force Google Chrome to open PDF files in new tab? Now Chrome opens PDF in tab which is currently opened and it's really annoying to click on "back" button to get back. Thank you for help! ...

Google chrome link stylesheet tag at runtime

I'm adding a CSS link tag at runtime, it works in all the browsers except for chrome, which simply refuses to use the CSS, Its a PHP script file in which a header('Content-Type: text/css;); has been added as follows var css; css = '<link rel="stylesheet" type="text/css" href="http:/domain.com/cm.css?c=someval"/>'; $(css).appendTo("body"...

Mime type for zip file in Google Chrome

I discovered a weird issue in zip file's mime type when I worked on a Symfony application. According to w3school, the mime type for zip file is application/zip. This is what I believe, too. But when I upload a zip file in my Symfony app with IE, the mime type of that zip file is application/x-zip-compressed. When I upload a zip file i...

Get/Set caret position of iFrame in Safari & Chrome

I'm using the jQuery plugin lwrte (http://code.google.com/p/lwrte/). I've implemented a custom drop down in the panel of the wysiwyg that, when select, outputs a value at the cursor position. This jQuery plugin uses an iFrame to accomplish the wysiwyg functionality. The above works in IE and in FF, but is broken in Chrome and Safari. Th...

Firefox Extension -- Load page in menu bar?

I am not sure if this is possible, partly because I have no clue what the terminology would be... I want to create an extension that, among other things, will have a feature where, when the user clicks on the status bar icon a small window will slide out and inside that window will be a website login page. They would then login as norma...

Google Chrome javascript error - cannot call method 'join' of null

I started to test my web site on google chrome and 'cannot call method 'join' of null' appears when doing this: var sChoices = oQuestion.aChoiceRand.join(""); In IE and FF works well. What I'm trying to do with this code is to join all the 'aChoiceRand' array elements in a string without any separators. How can I solve this? ...

What GUI library does Google Chrome use?

What GUI library does Google Chrome use? ...

jQuery Date Range Picker giving error in Google Chrome

I am using the jQuery Date Range Picker by the filament group. My code is such that I'm dynamically creating a textbox or rather an AJAX query returns HTML of a form. When I dump the HTML onto my page I call a script that invokes the daterangepicker() function supposed to turn an inputbox into a date range picker. My code works perfec...