cross-browser

How to get iframe contentWindow height in cross domain

i want to auto adjust my iframe height according to their content but in same domain it's work properly with contentWindow.height but in case of cross domain its permission denied for accessing iframe dom. ...

Javascript strings - getting the char at a certain point

Hi, I have a variable: var text = "hello"; I want to get the 0 positioned character, so: var firstChar = text[0]; Simple. In firefox and chrome this works. In IE however i always get back 'undefined' Any ideas why this might be happening in IE? ...

closures handled differently on desktop browser and mobile safari?

Here's a simple javascript program: var $d = {}; var AudioPlayer = function(filename, timeUpdateCallback, playbackDone){ // An HTML5 audio player is defined here. } $d.AudioPlayer = AudioPlayer; var AudioManager = function(chapterId){ var audioPlayer; var me=this; this.next = function(){ ... ...

Is it good practice to check user-agent with SSI?

For example, what if for reasons of purity code I replace conditional comments with HTTP_USER_AGENT check? Instead of <!--[if lt IE7]> <link rel="stylesheet" href="/css/ie6.css" type="text/css" /> <![endif]--> i write <!--#if expr='$HTTP_USER_AGENT=/MSIE 6.0/' --> <link rel="stylesheet" href="/css/ie6.css" type="text/css" /> <!--#en...

Spring MVC form hidden field appears null only in IE

In a simple sample, I have two models DailyTimesheet and MonthyTimesheet: class DailyTimesheet { // other properties MonthlyTimesheet timesheet; } class MonthlyTimesheet {} In the form, I have the code as: <form:form action="/update/timesheet" method="POST" modelAttribute="dailyTimesheet"> <form:hidden i...

IE 8 Doc Mode - Pros and Cons of <meta http-equiv="x-ua-compatible" content="IE=8">

What are the pros and cons of adding <meta http-equiv="x-ua-compatible" content="IE=8"> to a website. I would like IE 8 to render in the IE 8 Doc mode so styles are more cohesive across browsers. I am just worried about negative consequences of adding this. ...

Are there still ECMAScript 3 implementation differences in major browsers?

Can someone point out the differences in implementation of ECMAScript 3rd edition in today's browsers? (Chrome, Safari, IE8, FF) Are we safe when using ECMAScript 3 standards (and not the extensions that FF and IE have to JScript and JavaScript)? ...

CSS Text position IE/FF issue

I have this navigation <div class="cookieBar"> <div class="light first"> <a href="#" class="ckLnk">Home</a> </div> <div class="dark"> <img src="images/cnavR1.png" class="pointE" /><a href="#9" class="ckLnk">Cars</a> </div> <div class="light"> <img src="images/cnavR2.png" class="pointE" /><a hr...

Detect support for multiple background images?

I really want to make use of multiple background support (Webkit, Firefox 3.6+), but I would like to provide an alternative solution for browsers that don't support it. (IE, Firefox 3.5-). Is there any way to detect support for this CSS feature? Or will I have to resort to browser sniffing? EDIT: Javascript solutions are welcome ...

XHTML multi-column text flow div

Hello! How can I have multi-column text flow in div for XHTML please? (if possible) I'm looking for a cross-browser specification. Thank you. ...

using xpaths in javascript

I have a large set of XPaths for selecting content in webpages and I want users to be able to use them in the browser (including IE). What do you recommend? Try and interpret the XPaths with JavaScript? Or perhaps convert to regex? Some existing JavaScript XPath work: http://js-xpath.sourceforge.net/xpath-example.html http://goog-aja...

Highlight and Edit XML in a browser

Trying to provide a user with editable XML page in a browser. For example, the following is part of an XML. <Employee name="John Doe" type="contract" ID="1000"> <Salary>10000</Salary> <Email>[email protected]</Email> </Employee> When the above is presented to the user in a brower (either IE or FF), the user should be a...

Cross browser HTML5 iFrame

Right now I have an iFrame object with the seamless attribute which looks perfect, <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.google.com%2F&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=400&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;height=35" seamless></iframe> with a coupl...

jquery script only works in IE 7 but I need cross compatibility...

Any reason as to why this script won't work in any other browser. HERE'S the JsFiddle The effect in IE 7, which is correct...is that the menu scrolls down and as you hover over the menu items and they animate by shifting to the right for the "on hover" of an <li> object. The effect in FF 3.5 is incorrect. The menu dropdowns, will scro...

Does HTML rendering differ amongst different versions of windows ?

Does HTML rendering differ amongst different versions of windows ? For example does firefox 3.5 render HTML on xp the same as windows 7 ? ...

CSS Problem with IE 7 or 8 which is working fine in all other browsers

Hello All... I have created a menu and submenu bar for my web app. Now with the css classes that I have applied in is working perfectly in mozilla, chrome,safari. But it's not working fine at all with IE 7 or 8. The HTML code for the generation of menu is as follows : <div id="menu"> <ul class="navigation" id="navigation_menu"> ...

Browser-neutral way to start local process from intranet

We currently have a corporate intranet built with ASP.NET and originally designed for IE. One of the purposes of the intranet is to manage file versioning and to launch programs with the current file version. This requires the intranet to start processes on the machine locally, and is done using ActiveX. We are now reworking the intra...

What's the optimal html link syntax to use for site icons/favions?

Which should I use: <link rel="SHORTCUT ICON" type="image/x-icon" href="favicon.ico" /> Or: <link rel="icon" type="image/ico" href="favicon.ico" /> I've seen both in use and both work in a lot of current browsers - but which is more consistently supported by the most browsers? ...

HTML: How common is it that different browsers render 1em at a different actual px size?

As you know, you can specify dimensions with CSS in px or em. As far as I understand it, em means "line height of the current element's fonts". My approach currently is to always use px (also for margin which seems to be a controversial practice). Question: Can I rely on the ratio of px and em to be the same across browsers? If not, the...

Max-height scales image perfectly in FF, but Chrome has scrollbars.

So I want a page that's nothing but a square image which scales up to the height of the window. Fine, great, I do: img { max-height:100%; height:100%; width:auto; } and stick an in a center-aligned div. Firefox loves it, but insists on the height:100%. Chrome doesn't need that, but adds a little bit of height to the page ...