cross-browser

Firefox adds an extra pixel on top of a text field, how to remove it?

I want to create a search bar like one in this page http://dl.dropbox.com/u/333492/search/form.html If you load that page with chrome, opera or safari, the search bar looks like it should (tested on mac). However, if you use firefox (tested at least with ff 3.5 and 3.6 on mac), you'll see that one extra pixel gets added on top of the te...

How to call javascript function only once during window resize event?

On jQuery resize event page it is said that: "Code in a resize handler should never rely on the number of times the handler is called. Depending on implementation, resize events can be sent continuously as the resizing is in progress (the typical behavior in Internet Explorer and WebKit-based browsers such as Safari an...

Form submitted twice in Chrome/Safari

Dear Stackoverflow, I am seeking to perform a basic form post, but the following submits to the server twice in Chrome and Safari (but behaves as expected in Firefox): <form id="create-deck-form" action="/decks/create" method="post"> <fieldset> <legend>Create new deck</legend> <label for="deck-name-field">Name</label> <in...

JavaScript - best way to add an event to an element without a library or using the onclick attribute?

So I want an element i.e: <a id="target">click me</a> to perform a JavaScript function i.e: functionName(); I want to avoid using the "on" attributes i.e: onclick="". By cross-browser I mean the A-grade browser compatibility list from YUI ...

jquery dialog not working in firefox

Why is that jquery dialog does not work in firefox? this is working in IE very well.I used jqueryblockui.js pug-in. function showConfirmation(progTit, msgText, msgIcon, msgHideIcon) { var tblMsg; tblMsg = '<table width="310" cellpadding="0" cellspacing="0" border="0" height=113px >' + '<tr style="background-color:#3a3a3a;">' + ...

How to achieve table's centering capabilities without tables

For me, one of the most useful features of tables is that their width adjust to its content. You can very easily do things like: <table align=center style="border: 1px solid black"> <tr><td style="padding: 20px"> some text here </table> If the content of that box is wider, the box will be wider. Very intuitive and it works on ALL bro...

User interface issues regarding embedded PDFs

Q.1. What are the advantages and disadvantages, from a usability standpoint, of embedding PDFs in a web page? Q.2. In general, for the average computer user, which scenario provides the most "streamlined" experience? Q.3. Would using cookies to remember the options substantially improve Scenario #2? Scenario #1 User sets options. Us...

Are there any JavaScript 'packs' that can make CSS3 compatible on IE browsers?

I was wondering if there are any packages available out there to make CSS3 capabilities available to browsers that do not support it yet. The way I envision this, and I've been unable to find anything via search, is the JS would detect the browser and load its own library that essentially do the CSS3 functions using JavaScript. I kno...

100% horizontal cross-browser menu HTML/CSS?

How to make 100% horizontal cross-browser menu HTML/CSS? 1. with keeping clean HTML, li list 2. no image/javascript, tableless, W3C standards compliance Example for invalid example: /*CSS doesn't make `block` right/left space between `li` items (see attached image)*/ #nav{ text-align:justify; } #nav li{ /*border:1px solid #000; mar...

Fetching raw CSS file contents from a browser

Is there any way to fetch the raw contents of a CSS file? Lets imagine that I wanted to fetch any vendor-specific css properties from a CSS file. I would need to somehow grab the CSS contents and parse them accordingly. Or I could just use the DOM to access the rules of a CSS file. The problem is that in while using the DOM, mostly all...

What would be a complete way to check for null cross browser

I'm looping through an array in JavaScript to check for null in each object using jQuery, what would be the best cross browser solution for this? ...

xml counting elements in a list does not work in firefox, can someone help?

Hi, I am writing some CSS to customise the display of an XML document. Basically I want to customise the display of child elements, and render them similar to HTML OL/UL/LI elements. My XML is structured like this: <?xml version="1.0"?> <?xml-stylesheet type="text/css" href="style.css"?> <transcription> <turn> <spea...

Can't access form element in IE because it 'is undefined'. Works ok in FF and Chrome

It's strange because I only get 1 error in IE: 'sTime is undefined'. sTime is the ID of one of the many input elements in my form. Everything works fine in Chrome and FF. Here's a link to the code: http://la.truxmap.com/sched.html and the form html: <form id="addNewTruck" class='updateschedule' action="javascript:sub(sTime.value, e...

First list item (<li>) floating right in google chrome

I am having problem with google chrome. The problem is the first list item's bullet is floating right and all other list item's bullet aligned correctly at left. Plz help. Any help will be appreciated EDIT 1 <div class="window_sub_title2">The Interface</div> <ul> <li>Toolbox </li> ...

Quick Test javascript snippet for browser compatibility

Just as we have snippet compiler to test a C# code quickly, I can also do the same for javascript in chrome debugger tools and Firebug (firefox). I would be more interested in a tool or some online tool which can run a small piece of javascript and tell if it properly runs in prominent browsers and the result. UPDATE: I'm a developer ...

Display DL like a table

How to style definition list items to have each definition in one line? HTML: <dl> <dt>word</dt><dd>meaning</dd> <dt>word</dt><dd>meaning</dd> <dt>word</dt><dd>meaning</dd> </dl> Visual rendering I need: *word* meaning *word* meaning *word* meaning ...

Capturing onkeydown in Javascript

I have a web front-end to an AS/400 CGI application which allows the use of some of the F1-F24 keys (depending on the page) as well as page-up, page-down etc - these are passed to the underlying application which handles them appropriately. For instance, on a given page, a user could either press the F3 button or press the F3 key - both ...

JSF and Browser Issues?

Hi, I am using JSF 1.2 without tomahawk and other libraries. The JSF Applicatin works fine in IE7 but there are problems - input controls not enabled (for Firefox 3.0.3) and rendered and disabled attributes of commandButtons do not work in IE8. I am using simple javascript and css to do some validations and conditional displays at the ...

Inconsistent behaviour in jQuery depending on browser

I have my jquery: $('.category-block').mouseover( function (e) { $(this).find('.b-expand').show(); }); $('.category-block').mouseout( function (e) { $(this).find('.b-expand').hide(); }); And sample html: <div class="category-block" id="category-1"> <a href="#">Mod</a>...

If I start anew, should I start with Watir-WebDriver?

My team has an automation solution that uses watir. In fact, we have 2 versions of it, one for one release of our software and another for another release. I find that changing versions of watir used it not easy, so I want to select the right version for my new project (building an exploratory framework like Jim Knowlton talks about on W...