The code below is part of a tool tip set of functions. Currently this fails in Explorer as soon as it tries to set the event handlers to an instance of the functions. So in this case "initToolTipElements" is only printed once to the alert box and then the script stops. The code works fine in Firefox.
This is the doc type to the HTML page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
//Looks like this is only being run once in explorer.
Can any one tell me where to look for the problem?
First: the name attribute is not to be used upon all the HTML elements. In fact, for the modern browsers and under the last Doctype versions, there are only several elements which can bear a name (and which are to be found on using DOM getElementsByName() method. <AREA> is not one of them.
Ah I see, OK so is there a getElementsByTitle function in JS? If now how would I go about collecting all the elements with a known title? Would this require a recursive function and go through all tags in the body and collect them?
Thanks, I didn't know about those tool tips how ever that is not what I'm looking for in the final product. I really do need to use JS to get more data into a nicely formated popup that tracks the mouse.
What I have works, just not in IE, so I gather that I need to find another way to collect the correct tags that will get the popups.
What I have is a parameter in any given tag that is called toolTip="someName" and I use that property value to display the correct information.
At the moment I'm looking at writing a recursive function that will search the page for any tab with a toolTip property. Is that the best way to go about doing that? The tag could be a div, an area, or other.
Thanks for the help, here is what I was shooting for and so far it is working on several browsers correctly. It is the map section of the site that now has nice little pop ups to display the clientele in that area.
If any one sees any problems in any browser please let me know. I don't care about old browsers as any one coming to our site will be on the latest machines and software as a two year old machine is way out of date for us.