DOM Table Manipulation Not Consistent In IE Vs Mozilla
Jul 23, 2005
I'm trying to write some javascript code that will swap two rows in a
table, in an attempt to provide users with an easy and visual way to
manually change the order of the listed items in a table.
The sample code works as it should in IE, and switches the two rows
nicely.
In Mozilla however it fails the first time, but for some odd reason it
works fine afterwards.
Mozilla doesn't seem to be removing the duplicated node the first time,
which makes it appear as if an extra node is inserted into the table
(which is actualy the case), but on subsequent attempts, it seems to be
removing the duplicated node perfectly... Code:
I have a javascript slideshow with a "thumbnail strip" at the bottom that scrolls based on mouse position or current image. I am using the setTimeout function to loop through scrolling the div, but it is not consistent. also, it works good in Safari and Chrome, IE is slow, and Firefox is choppy. is there a way to make it scroll smoothly on all browsers? all the code is in one html file. here is a link to the file: [URL]
The value of lastModifier varies from browser to browser. For example, for a server writing the header:Last-modified: Fri, 04 Jun 2010 20:41:59 GMTSafari 4 puts out a literal string that is exactly what is found in the document header, Fri, 04 Jun 2010 20:41:59 GMTFirefox 3.6 and Internet Explorer 8 put out a reformatted string in local time (not sure if it's the server's local or the browsers local, since my server is in the same time zone).06/04/2010 13:41:59Is there any way to get a consistent lastModified string without doing browser sniffing? I would expect sniffing to not be resilient to change, given that lastModified output has changed before in browser history, based on posts from several years ago, and will likely change again.
I have a question about what the most certain method to obtain the correct UTC time in javascript is.On my forum, there is a countdown clock, that should show the same amount, wherever the user is located. I use UTC in javascript to get the current time, but I have trouble getting consistent results.I have tried two methods:Method 1:
Code: var d = new Date(); var localTime = d.getTime();
Once you load this up you will see that eventually the hover will not set the height correctly. Keep on hovering on each item and then leaving it before it fully expands and then the next time you go over it it will leave off where the last item had expanded to
I have list of about a thousand applications for which various outsourcing companies are supporting at different levels. I want to use the attached code to filter. For example, if I type "SOX", every row with "SOX" appears. The filter works well but when I type "S" and the information appears on row, the height of the row changes. When I type "O" it changes more. What must I change to keep the height of the rows consistent.
had this in browsers areas but people told me I should put it here in Javascript because more people here would probably have seen it before and know why it happens. I have basic Javascript that rotates images. I've noticed any kind of Javascript code that rotates images has this same problem only in Mozilla. When the images rotate in Mozilla in between the rotations, Mozilla browser adds a little colored square that represents a blank image that are able to be seen does anyone know why Mozilla Browser adds that? For example when looking at this page in Mozilla can see it. if you know if this is some Mozilla problem with Javascript and images. Doesn't happen with IE and other browsers shows the images only and nothing else.
What to return from my functions. Initially I was returning true or false to indicate success. But really, true only indicates that the function completed, not that it successfully did what it was supposed to do.
Try/catch is pretty useless as the browser tends to ignore most errors and so doesn't execute the catch clause in a consistent manner.
I notice libraries tend to return an object reference, which would be undefined on failure.
I've a BIG Problem With a HUGE JS application , i'm modifying its javaScript code to work on both IE/Mozilla , currently it works fine on IE but not on Mozilla.
My main Point now is events.
Lets try with a little module, consider this function :
And it is attached in this place like :
This works fine in IE , i want to modify it to work on Mozilla.
I would like to display a series of smaller foreground images on top of a larger background image and possibly even control the position of the smaller images dynamically. Is this possible? If so what is the syntax for placing the small images on top of the large one.
I am attempting to pass two user inputs into one variable (text, not array) to pass through my credit card company.
What I have done it two "onchange" scripts so that when the customer enters their information the script runs it does a search and replace on "name" for there name and "number" for their number. However!! If they change their name (or number) a second time the search and replace will fail as it will no longer find "name". Therefore I though some sort of RegX facilitated where I prefix their name with a hypen i.e. '-'.
Is it possible to use regX in this way in Javascript? Can anyone provide advise or a link? Alternatively, am I making this a lot harder than it needs to be!? i.e. could I do an onSubmit instead to change it? I have tried this, however it didn't seem to work.
I've written several scripts that have "while" blocks which increment a date by one day if the date does not match one of a group of dates. However, sometimes it apparently steps out out the while loop even though my condition isn't met. Will work for a few loops then steps out often.
Are there javascript "date" issues? I have also noticed different results between Firefox and Internet Explorer.
jQuery('div#primary').attr('width', '300'); I am manipulating html file. I am doing the above. But It is not updating the html file with the new width.
I am currently creeating a navigation, am am a bit stuck with the navigation.[code]So there should be a new <ul> after every third list element in the sub-menu.[code]
we have a piece of code which does some XML manipulation and it broke in IE (at least 7) between jQuery 1.5 and 1.6.At this link is the chunk of code running on 1.5.2:[URL]and at this link is the same exact code on 1.6.1 and erroring in IE: [URL]On the second link, IE is reporting an error down in jQuery for invalid number of arguments to a method. The second alert never shows.
This is a personal problem (he he) - not for work or school. I have tried to avoid adding Javascript to the things I need to learn but now I find myself needing to use it. I have several textareas in a form. I found (on this forum) a short piece of code (function) that will clear a textarea. It works just fine as long as I hard code the textarea name. I would like to use this one function and pass to it the name or Id of the text area I want to clear.
I want a script to receive a time in the 24 hour time format HH:mm (e.g. 18:30) and remove 15 minutes from it.The problem is that if the time inputted was 00:00, then how do I get to 23:45?
I'm sure it's easy if you're in the know.I can do this with PHP, but not with JS.I just need the function / basic line of code that does this. I can work out how to call it etc. myself.
This construction isn't working. The variable strName gets the name of the object (i.e. afkorting) but the alert doesn't work. Has somebody an idea what I'am doing wrong?
I built an IE-only function that modifies the DOM to create a custom container with rounded corners and some shading at the top. It only gets called when the browser is IE and its version is < 9. It takes the following block:
And turns it into this:
The UI looks identical to FF, which uses the CSS3 attributes to create the rounded box. HOWEVER, in IE8, I can no longer access the embedded <input> element (which does not change). I'm trying to get the value of the <input> tag with the ID of "username" by doing this:
When I disable my DOM manipulation code so that in IE, it remains an ugly, square box, I can get the value of the <input> element with no problem. Once I manipulate the DOM, IE always returns the empty string while FF and Opera work perfectly.
I need to do multi DOM manipulation into a page without reload it (something like: when i click on a thum in another part load a photo with a specific text, if i click on this text load another photo).
I use a js like:
First page loading everything goes good.... but when i fall into MY_CODE1, i can't execute MY_CODE2 anymore.....
I need this iframe for a facebook tab, since they changed the width to 520px. The original page in the iframe is 700px wide, and I've changed a few CSS properties using the frameReady plugin. It's works just fine, but trouble starts, when i'm navigating the target site, the CSS properties I've changed goes back to the original settings.