I am currently getting the position of a DOM element by using offsetLeft & offsetTop. This works fine, but I notice that when I use these properties in Internet Explorer the values returned are slightly different from when I use them with Firefox, Safari, or Camino.
I am basically trying to create a DIV over a certain part of a fixed table, so I use offsetLeft & offsetTop to get the coordinates of that table and then position my DIV based on those coordinates. The problem is that with Internet Explorer it seems to be a few pixels off compared to when I do it with Firefox, Safari, or Camino.
Alert shows the distance from input to the top of the table or table cell. Is there any other attribute which shows the absolute distance from input to the top of the page ? Because of some reasons I can't add table's and input's offsetTops.
I've got a script that determines the true position of an element in the page by cycling up the .offsetParent elements all the way up to the <body> element and tallying up the .offsetLeft values returned by each element. It works fine on the major browsers (IE, Moz, NS) on PC but Safari on the Mac returns "0" for the offsetLeft right off the body tag when it should be a greater value than that....
Is there a way to calculate the .offsetLeft or .left of a character in a string relative the element that contains the string? I'm just trying to wrap each character in an element and position the characters independently, so I have to set the .position to absolute, and set the .left and .top on each element as I create it so I can move the elements later on.
I used the DOM for mozilla to write some javascript. And naturally it doesn't work with IE and I haven't tried it on Opera type browsers. Is there any website that spells out the DOM's for IE and Opera individually like the mozilla one? Ie: http://developer.mozilla.org/en/docs/DOM:document.createElement
I would like to get the selection of the dom (meaning a highlighted area), then get the range. From the range I cloneContents in order to get a document fragment. Is there equivalent functions for IE and Opera etc? Code:
I have this code here that reads in a javascript file and increases or decreases font by its relative size (same thing as View, Text Size, Large, small, etc.) I am developing this for Transport Canada and I need some help. Here is my code. I need it to be compatible with IE, Mozilla, Netscape and Opera. Most versions of these browsers has to be compatible. If you could help me out the least bit would greatful. Here's the code:
Why is it that most (well, honestly all that I have seen) the JS based modals, those that use frameworks like MooTools and JQuery, and what have you, why are most of the nifty visual effects like drop shadows and rounded corners, they don't work in Internet Explorer, but do work in FF, WebKit based browsers like Safari and Chrome, and Opera?
For an example, have a look at MooTools based MediaBox ( a LightBox "clone" ):[URL]..
how I can make this work in IE as well?? It is a code that shows a divide on click and then hides the rest at the same time.live code is also at chryscreations.com/ns/boynames.html
On my site, I would like to open a centred pop-up with thumbnails. Clicking on them you get the full image with navigation arrows leading to new photos, etc.
I want to have pop-up dimensions suited to what's in the page and if the photo is vertical or horizontal.
Now, the code here under works well with FF2.0 and NS 8.0, but IE6 and Opera 9 just make the window.close() in func_aperta() and closes the pop-up.
I'm currently modifying a php controlled website and wish to distinguish between javascript and non-javascript browsers in order to decide which pages to display. I have a single php controller script which "includes" a number of html pages. I want to ensure that I cater for both javascript and non-javascript browsers (so functionality is the same, only the javascript pages have a far better look and feel to them).
Therefore I would like to code something along the lines of :
Code: if (javascript_browser=='true') { include './javascript_page1.html.php'; exit();
I have a nice Javascript code which allows users to HTML format code in a textarea, similar to the code of Post New Thread page. It works great in Internet Explorer but it does nothing in other browsers.
It seems the problem resides in this two lines:
Code: a=document.selection.createRange(); seleccio = a.text; How can I arrange this lines in order to make them cross-browser? I really need this code to work, at least, in current versions of Netscape, Mozilla and Opera.
Does anyone see anything wrong with this code? It's a mystery to me why it works fine in all browsers but IE6/Win. Not getting any JS errors or anything to help debug.
<script type="text/javascript"> function submitGeoSelect ( geositeID ) { var geoURL = "https://<?= $_SERVER['SERVER_NAME']?>"; switch ( geositeID )
The following code works well in IE5 and Netscape 7, apparently my page is not working in Netscape 4.6 and it has been suggested that i need a third option dwellig around the document.layers object, could someone tell me what line I need to make it compatable for earlier browsers?
I went through the past six months or so of entries in c.l.javascript, and found a couple where people had expressed opinions about the value of supporting much older versions of Netscape and IE. The entries included incidental mention of server logs showing how many pages had been retrieved by such browsers.
I'd like to get some sort of communal variety of opinions on how much effort it's worth to put in the support, or in some cases, the "graceful degradation" allowing partial capabilities to remain in a page under the old browser.
My situation is that I have no access to server side capabilities or CGI, have yet to buckle down and learn Java, but have a fairly complex application I'd like accessible via the web.
Are there links answering:
1. How many commercial sites still insist on full compatibility? Allow significant degradation? Give up on NN < 6? Ignore browsers with small market shares?
2. How do developers feel about coding for browsers older than, say, two years?
3. Are there statistics from a variety of sites showing use by different browsers?
I have been using document.cookie to write and read cookies. Unfortunately, when I open my page in Internet Explorer, I don't see what I wrote to my cookie while in Netscape Navigator. Similarly, my page that I opened in Netscape doesn't see what I wrote to the cookie while in IE.
Surely there must be away for IE and Netscape to read the same cookie information ??. Otherwise, what happens if a user just happens to be browsing my page in both browsers? They'll expect things to be there, and they won't be there because one browser doesn't see what was written in the other.
Any ideas on how to get Netscape to read cookies written by IE, and visa versa?
My code runs great in every browser but IE6 IE7 and IE8. it breaks and causes all scripts to fail. i setup Visual Web Developer in my VM like a blog post told me, and when i load the page i get Microsoft JScript runtime error: Object doesn't support this property or method that seem to break on this line
I need to shed some light on browsercompatibilityon my website.here's the breakdown:
-website runs smoothly on Firefox and Opera -website runs slugishly on Safari and Chrome
now I understand that my code is not squashed down and formated for browsersuccess, but Im so perplexed why some browsers run itawesomelywhile the others run it as if it was os9.Also, I havent had a chance to cross check this site on other systems and computers so I would like to hearperformanceresults from real people
First off by let me stating that I am not a great web devloper nor am I a good with css / javascript. I am creating this website for a friend of mines company and I have one problem.The problem is that the navigation menu on the right side will not remain fixed how i want it to be. I spoke with many people and they all said that this cannot be done with css considering your layout and because it needs to dodge the headers and the footer. I basically want this div (sidenav on the right) to scroll along the page as users scroll up or down but it can not interfere with the header or footer. I do not want the right side navigation to go over the content or out of the wrapper. I want it to stay in the same position in all aspects - left / right / top / bottom. Here is a link to the site [URL].
My navigation buttons have rollovers and are working fine in FF, Safari, Netscape, Camino but not in IE.
Not only that but there are some weird dashes appearing between some of the buttons. I do notice that the dashes disappear when I hover the cursor over some of the buttons. Can't figure it out... Code: