Tuesday, October 13, 2009

Images Not Displaying in Firefox

Sometimes what you think is a problem with your web code is due to something completely unrelated. We created a web site and when I added an alt tag to an image (supposedly that was the cause and related timing according to the person having the problem) the image wouldn't appear randomly in Firefox for one person on one machine.

Now I know for a fact that adding an alt tag to an image is definitely not supposed to affect the ability for that image to appear in a browser. There's just no sense to that. When I finally had time to nail down all the parameters related to this problem it turned out the problem was only occurring on one machine, on any network, and not on any other machines on the same networks. I also never experienced this particular problem. Further Google searches indicated that a plugin from Real Networks somehow causes images not to appear in Firefox under certain circumstances. Further testing confirmed this to be the cause of the problem in this particular instance, however there is also information on the Firefox help web site about other potential causes of images not showing up in a Firefox browser.

The moral of the story is - it's not always the web site programmer's fault when something doesn't work. There are so many factors involved in web sites from your router and network equipment, local and wide area networks, machines in between you and the web server you're trying to access, all the plugins and add-ons in your browser and your virus and spyware software, not to mention potential malware and viruses on your machine. It's important to look into all these potential factors when trying to determine the cause of "a problem with a web site". It may not be the web site that has the problem.

Sunday, October 11, 2009

The Content already has an existing parent

If you want to make a new XML Document using JDom from a node in another XML document, you first need to remove that node from the parent XML document using detach() method.

If you try to create a new XML Document using the node before detaching it you get this error message:

The Content already has an existing parent [some parent node name].

I'm sure there is a reason why this is the error message but when you're using a node to create a new XML document the error message makes little sense to me in this particular context.