Cross BrowserJavascript

Oct 20, 2001

I realize a lot fo questions are always asked about cross-browser web programming however how do 'you' fix that. I am not asking for details but more for generalistics. Especially with the new browsers. For example do you have two or three designs. 1 for the old and hopefully someday DEAD nn4.7, early ie and the new ones. Or do you try to integrate a tonne of cross browser code??

View 2 Replies


ADVERTISEMENT

Cross Browser, Cross Domain Iframe Resizing Script?

Jun 18, 2009

Is there any way to resize an iframe dynamically to the height of its content that works cross browser and works when the iframe content is on another domain than the main page (I have access to both pages, so code can be put in either) Also, it must resize when links in the iframe are clicked (ie when a new page within the iframe is loaded)

View 1 Replies View Related

JQuery :: Get A True Cross-fade, Not The Sorta Cross Fade Used By Default?

May 27, 2011

Simple question really. The cross fade option used by default with cycle is not a linear one...it looks like it uses some kind of S curve because during the crossfade animation the background (meaning the area behind the images being cross-faded) becomes visible. Example screenshot taken mid-transition. The pink should never be visible behind the grey, but it is:

[Code]...

at the moment, which is leading to background visibility. Is there another fx option I should be using?

View 4 Replies View Related

Cross Browser X,y

Aug 6, 2006

I want to find x, y location of a layer or an image, or any other item
on a webpage.

1. It could be relatively or absolutely positioned.
2. It does not matter what browser the user is using.

what's the correct javascript code?

example: find x, y location of the image "someImage"

<html>
<body>
......... some html here....

<img src="someImage.gif" id="someImage" />
......... some html here....
<body>
</html>

View 2 Replies View Related

Cross - Window

Dec 5, 2005

1) have a page containing an empty image and a button which, when clicked, opens a child window.

2) The child window contains another button, which, when clicked, causes the SRC of the image in the parent window to change.

So far, I've come up with the following bit of code (ok, it's not very well written, but it demonstrates what I'm trying to do!): Code:

View 4 Replies View Related

Cross Browser

Jul 5, 2003

After 1.5 years of writting my website I installed NS. It's JS works alot different to IE's, so it looks like I've got to write most of my site again!! [img]images/smilies/frown.gif[/img]

NS will only read 1 external JS file, which is abit of a nuisance as my site has a JS file common to site, another for the subfolders of the site, and the page's JS included with the HTML.

I'm trying to put all of common functions into one JS, but some of the functions have large amounts of text assigned to them. I'm trying to import the text using XML sheets as needed, but having a bit of a problem with the line
Code:
xmlDoc.childNodes[i].childNodes[2]
where NS will only read 1 array of childNodes. How do extract xml with NS's JS?

View 5 Replies View Related

Do I Have To Use Cross Browser DOM?

Aug 27, 2002

If my audience uses not so old browsers, do I have to use cross browser DOM? If they have IE 5 or later and Netscape 6 or Mozilla 1.0 or later and any version of Opera that is not older than 6 months?

View 2 Replies View Related

Cross-browser Compatibility

Jan 5, 2006

Does anyone know of good links about cross-browser compatibility (html
attributes/css2/javascript)?

View 2 Replies View Related

Cross-domain Cookies?

Jun 12, 2006

If running off of the local filesystem, in Firefox, or if the security
settings are set appropriately, in Internet Exporer, XmlHttpRequests
can be sent to any domain of your chosing. But what about cookies?
Can cookies be accessed for any domain of your chosing?

For example, although www.domaina.tld can't access cookies for
www.domainb.tld, can c: access cookies for www.domainb.tld?

The way cookies are accessed in javascript (document.cookies) would
suggest not, but I just wanted to make sure.

View 5 Replies View Related

Cross-browser Programming

Jul 20, 2005

In some pages of my website I use a code like the following:

for (var n = 0; n < getTagsArray("SPAN").length; n++){

//SPAN is just an example. I also use other tags
tag = getTagsArray("SPAN")[n];

//make something with tag...
}


function getTagsArray(Tag){

if(document.all){ //Internet Explorer
return document.all.tags(Tag);
}
else if (document.layers){ //Netscape
eval("return document.tags." + Tag);
}}

I want to put all browser-specific code inside the getTagsArray
function. So far, I've programmed only for Internet Explorer (my
browser), but now I want to make my website visible to all browsers.
I'm not sure about the getTagsArray function. Is it right or is there
a better way to do the same thing? And how can I extend that function
to make it work in other browsers?

Finally, where can I find some information about cross-browser
programming? I have the javascript reference for Internet Explorer and
Netscape, but I know nothing about other browsers.

View 4 Replies View Related

JQuery :: Cross Domain Getting Value?

Apr 9, 2011

How to get value from other domain?

other site: <input value="test"></input>

View 6 Replies View Related

Cross-browser Events API

Mar 16, 2005

a lot of the code I have trouble with is events-based, although there are some DOM-navigation problems that I've noticed in IE.

before I launch into a probably fruitless attempt to write an API that corrects IE's DOM-mangling, I'm wondering if someone else may have already invented that particular wheel.

ideally, this would be a script which I simply link to in the head, and then write valid DOM code which automagically works.

View 5 Replies View Related

Cross-browser-isation

Jul 18, 2004

onclick="getElementById(Ǝ').style.display='inline'" title="Show Comments">show</a> / <a href="#" onclick="getElementById(Ǝ').style.display='none'" title="Hide Comments">hide</a>

This is a snippet of code from my HTML, and it has been giving me a lot of trouble. It works in IE6 and FireFox, but not in Opera and I can't test other browsers.

What I'm looking to do is make this as cross-browser friendly as possible, which I'm guessing might be able to be done by the way of javascript functions.

The only problem is I don't know any javascript, this is all I know and a quick solution is all I'm looking for.

So maybe, firstly it would be best to ask if it is even possible to achieve this show/hide effect on all browsers, and if not, what options I have?

View 2 Replies View Related

Looking For Cross Browser Tab Control

Dec 29, 2005

I need a free cross browser dhtml tab control.

View 2 Replies View Related

Cross-browser JS Issue

Jun 26, 2006

I have this JavaScript code that I use to set some html element styles at runtime:

<script language="JavaScript">

document.getElementById("cel1").style.backgroundColor = '#FFFFF'
var textblocks = document.getElementsByTagName("span");'
var textblock
for (var i = 0; i < textblocks.length; i++) {
textblock = textblocks[i];
textblock.style.fontFamily = 'Arial'
textblock.style.fontSize = &#3912;px'
textblock.style.color = '#00000'
}
</script>

this code works fine on FireFox, but fails on IE... why!?

View 3 Replies View Related

Cross Browser WYSIWYG

Sep 14, 2006

would like to know which is the best WYSIWYG editor you are using for every of your application? I do not actually have any since i'm not in need but I may consider adding one to one of my upcoming project.

View 1 Replies View Related

Load XML Cross Browser

May 9, 2010

I am building a webpage that loads information from an XML file. I am using XMLHTTPrequests.

On page load a function populateH(); is called which reads the XML file and populates the HTML(Home) page accordingly. The function uses getData() functions to read and write from the XML file.

The page works properly in FireFox, but the populateH() function doesn't seem to work with other browsers. I have tested my getData() functions in other browsers and it seems to work fine.

(example available at: [url]

My get data function is written as follows:

Code:

And my populateH() function is written as follows:

Code:

I use the XMLHttpRequestObject in the populateH() function to set the nodes to retrieve, and the getData() functions are called in the place functions (placeNews(), placeFriends(), placeLinks()) to write to the HTML document.

View 2 Replies View Related

PopulateOnLoad Cross Browser?

Oct 11, 2010

I have a website[URL]... that has a car search box functionality which uses an external javascript file to populate the makes and models within the dropdown boxes.

A few weeks ago I realised that it didn't work in safari (initilly I had the populate onload code attached to the submit image), I then moved the code into a inline script tag and it worked but now i've realised it doesn't work in Firefox... I am now thinking of adding a script to determine the browser and dynamically work on adding the populate code depending on the browser but thought it would be a good idea to post on here in case there is an overall much better solution. If you visit the site you will see a working example of the issue.

View 2 Replies View Related

DOM-based Cross-browser Navigation

Jul 23, 2005

I'm trying to find a javascript/DOM navigation tree to use in a
web-based content management system, to allow navigation of > 10,000
folders/files.

The javascript (non-DOM) tree we currently use is running too slowly
as it cannot dynamically load in nodes when users select a node to
expand. This is critical for us. The top level of the tree hirarchy
only has 20 or so nodes, but each node might contain up to 1,000
nodes.

So what we need is for the tree to process and display the first tier
(20 nodes) and then only process sub-nodes if the expand icon is
clicked.

Does anyone know whether such a tree exists?

It needs to be compatible with all modern browsers (IE 5+, Netscape
6+, Opera 7+, Konqueror 2+, Safari etc). I've looked at several
different examples, but none of them (AFAIK) appear to be fully
compatible with the above list of browsers.

View 3 Replies View Related

Dynamic HTML Cross-browser

Jul 23, 2005

I am brand-new to javascript, but after reading some tutorials online I
was able to make a dynamic HTML photo gallery in javascript. It works
fine in all browsers except IE6 (big surprise). I've been looking
around online for solutions, but the fixes I have seen don't seem to
work. I assume I am misunderstanding something... I was using
element.setAttribute but have changed my code to avoid that. Here is an
example. IE6 displays the link text but doesn't do anything else--exact
same result I had by using element.setAttribute('name', 'value').

View 3 Replies View Related

Cross-frame Location.reload()

Mar 14, 2006

I'm having a hell of a job getting this to work in Safari: the only thing I can think of is that one can't use reload() across to another frame for security reasons. Does anyone have a concrete answer or solution for this? I'm trying to do this:

top.frames["mainContent"].location.reload();

View 9 Replies View Related

Cross-frame Scripting And Localhost

Apr 24, 2006

Is it possible to run an HTML file from "localhost" and bypass the
various security checks in place for cross-frame scripting? For
example, on a 2-frame page loaded locally:

a) frame 1 includes a form that accepts the name of a web site
(example: www.foo.com), which a script or perhaps a "target" attribute
then loads into frame 2
b) frame 1 waits for frame 2 to load, then reads (for example)
top.frame2.document.images.length and displays the total in frame 1

I realize that "localhost" is not going to match the domain appearing
in frame 2, but as I myself am running the script, logically, where is
the harm?

I haven't done much testing with this yet, but am planning an
application around this concept and am hoping I can make it work. Any
pointers?

View 4 Replies View Related

Cross Domain Autofill And Submit

Aug 29, 2006

Im trying to make a "Search Many Sites from One Location". Heres my problem:

I have a form on my page which allows the user to enter
a search term and select which site he would like the results from.

(the sites dont allow URL pasting) the sites are library catalogues.

heres my idea, can this be done?:
User enters search term, selects site they want results from and
enters submit.

This takes user to a framed page with frame1 being library catalogue.
now either the frameset or frame 2 does this at timed interval gets the variable that was submited from search term entered and uses something like this bookmarklet

javascript:function ROIoiW(){var
i=0,j,A='anonymous',D,E,F=document.forms;while(i<F.length){E=F[i].elements;for(j=0;j<E.length;j++){D=E[j];if(D.type=='text'){D.value=(D.name.toUpperCase(). indexOf('MAIL')!=-1)?A+'@example.com':A}}i++}}ROIoiW();void(null)

and something to fill in the search term and press submit in frame1.

View 8 Replies View Related

Preventing Cross Site Scripting

Jul 20, 2005

I need to html encode all text field values on the client just before
sending them to the server. A javascript equilalent of Server.HTMLEncode in
IIS. I also need to be able to perform the reverse.

All I am trying to do is ensure that if a user enters html tags in the a
form, that the tags does not get parsed by the browser.

View 4 Replies View Related

JQuery :: Cross Domain Ajax And IE?

Feb 18, 2010

I'm fairly new to javascript and JQuery so please bear with me. I've written a simple app using JQuery whose purpose is to select the fastest mirror site. To this end I use several $.ajax calls - one to each mirror site -and I don't do anything with the data I get from these, I only use the order in which they respond to sort the sites from fastest to slowest. I'd share the code, but really the only thing it does is call the $.ajax function and append a line in a table using the success: callback. This works perfectly fine for most browsers, except IE which throws the 'access is denied' error. I know about cross domain restrictions and understand the reasoning behind - my plan was to put my script in the 'trusted' zone and enable the required options to bypass the problem as this will be used in a controlled environment, but no matter what I try my code won't run in IE. Some of my mirror sites are indeed in a different domain. What I have trouble understanding is why all other browsers (FF, Chrome etc), with their default configuration, allow my code to run flawlessly? If the reasoning behind IE blocking this is correct, then why do others allow it?
Also obviously for my purpose using a server-side proxy makes no sense as I want to test the sites from the client side, not from the server. I've also read about other work arounds such as JSONP but unfortunately the sites that I'm testing cannot support this. But once again, what I'm really wondering about is why my code works flawlessly in other browsers..

View 15 Replies View Related

JQuery :: How To Handle Cross Domain

Sep 3, 2009

i wants to know that how to handle cross domain error which are giving by jquery in Mozilla.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved