cross-browser

How do you automatically trigger a file input from another event handler?

In our project, we have a drop down box with a list of actions. We need to somehow implement functionality where if the user selects a certain item in the drop down box and presses the button next to it, a file upload box will be triggered. However, if anything else is selected in the drop down box, it should not trigger the file uploade...

jQuery ajax caching: false works only in firefox

I develop a simple overlay to preview image in full size. I use "cache: false" to prevent caching. The code is simple: $.ajax({ url: urlFull, cache: false, success: function(html){ // display image }, error: function(XMLHttpRequest, textStatus, errorThrown ) { // display error } }); The problem is - Whe...

Inserting text at cursor in a textarea, with Javascript

I've had a look round the web for solutions, and there are some, but they all seem to split code into supporting IE and Firefox. I was wondering if there's a more elegant way which would work on every browser, to insert some text at the cursor in a textarea. Thanks very much, Rich ...

Lightweight library for cross-browser event support - JavaScript

Hi folks, cross-browser handling is quite a hassle sometimes. In this case I need to capture quite a number of events, but cannot afford to use a multi purpose library that exceeds 10ish Kb. (e.g. jQuery, Prototype, Dojo, YUI, ...) The script is meant as a basic tracking tool for various sites I'm maintaining. Every browser seems to...

jQuery slider and IE6 Issues

I'm having a few issues with our old friend IE6. The site I'm working on is for a public sector client so it has to support IE6. The slider is fine in IE7+, Firefox, Safari and Chrome. I've tried everything that I can think of but I'm drawing a blank! Can you help? IE6 on a PC. Chrome on a Mac ...

Why Should I Care About Opera?

Firstly, I'm not against Opera. It just seems when I encounter cross browser issues, and do a little research, I always find "the fix", but then I see a comment crying foul that the cross browser solution I'm looking at doesn't work in Opera. Should I care? With IE finally getting its act together with IE 9, Google's Chrome and other S...

Javascript error in every browser except Firefox

I'm pulling my hair out over this. I have this bit of javascript that asynchronously fetches data for an events calendar. Basically when you click on a day of the month a little UI pops up and a text area gets populated with the data that gets retrieved. On this UI are two submit buttons: one to save changes, and one to delete the event ...

Cross-browser CSS for left align and right align on the same line

Cross-browser CSS that works to allow both left and right align of text on the same line? Example (where each text quote should be aligned as far left or right as possible, respectively): stuff on the right stuff on the left No float's answer's please.. unless there is a way to make the t...

Cross-browser CSS for left align, right align AND center align on the same line

Similar to this easy one, except how do you get a third text group to show up dead center, along with one "dead left", and one "dead right"? ...

How many nested tags in HTML can you have before it crashes a browser?

I had a thought earlier today regarding nested HTML tags and how browsers render them: <html xmlns="http://www.w3.org/1999/xhtml" {or whichever html version} xml:lang="en" lang="en"> <head> </head> <body> let n = 1 <div> recurse div n times until maximum (browser fails) </div> </body> </html> what will n be when the browser cann...

Why are so many different properties required to use a CSS3 property across browsers?

Why when I want to use border-radius do i need 3 seperate browsers? border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; Why can't they all just understand border-radius ? ...

CSS: change buttons layout

What's the easiest solution to customize default buttons in the web pages ? I need to change the button shape, from this: to this: I prefer to not use javascript, and I only need cross-browser solutions (IE included). thanks ...

HTML: Why script tags should always have full ending?

Possible Duplicate: Why dont self-closing script tags work? I wonder why scripts included into header html tag should always have full ending <tag></tag> like this: <script src="/scripts/jquery-1.4.1.min.js" type="text/javascript"></script> while xml well-formed shortened form <tag/> makes browsers crazy: <script src="/scr...

Html: how to calculate layout boundaries

Is it possible to calculate boundaries for a html layout block? For example there is <div id="area"> ... </div> and it's required to find out minimum size (width, height measured in pixels) to fit the #area into popup modal dialog. How stable are these approiaches? Thank you in advance! ...

Anyone know how to calculate the DOCUMENT dimensions, NOT the VIEWPORT in Javascript?

Just to make sure everyone understands what I am asking for, I will run through what I believe are the basic distinctions between document, window, and viewport.... WINDOW is the entire browser window, including all nav bars, etc.... VIEWPORT is the portion of the window used to view the current XHTML/HTML/Flash document... DOCUMENT i...

IE8 - Enter key won't submit my search field.

Hey guys, I have a search field that is not submitting when the enter key is hit, this issue is only happening on IE8, every other browser is working just fine (even IE6). Please guys I need a hand with his, find below the code I have for it. <div class="box-search"> <input type="text" class="text-box" id="text-search" /...

Comment author name renders nicely in Chrome, but half blank in IE 8

Hello, In the code below, the $row["username"] is the author of a comment. It renders well in Chrome, but in IE 8, only the top half of it appears. Any idea how to make it so all of it appears in IE 8? Thanks in advance, John The code: echo "<table class=\"commentecho\">"; $count = 1; while ($row = mysql_fetch_array($result)) { ...

Firefox says this is not a function. Must be a simple bug, but I can not see it.

All the other browsers operate just fine with this, but firefox says 'share is not a function'. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf...

Is there a best practice for handling browser resizing?

I feel like GMail is an excellent example of best practices in action, but I'm looking for a more theoretical code-based approach. CSS? JavaScript? jQuery? Let's hear it. ...

What's the best practice about dealing with corners on a fixed-height element ?

Hi, Here is my problem. I have to round corners on a <a href=""></a> but without using CSS3 properties because my code is supposed to be cross-browser compliant (IE6 and earlier, Safari 3 and earlier). What I managed to do is : <span> <a href="">My link</a> </span> Giving my span a background image (5px width) left align and my...