Thanks. This is beginning to look really complicated. The tips themselves are created on the page from a user maintained data source, fed into the page with Ajax. So on the page, I don't know which fields may or may not have a tip defined.
Here's one of the functions that gets called when the user switches languages.
function getHints(language)
{
var hintSelector = "HintEn";
if (language == "fr") { hintSelector = "HintFr" };
$.ajax({
contentType: "application/xml; charset=UTF-8;",
url: "webGetHints?OpenAgent",
cache: true,
dataType: "xml",
type: "GET",
success: function (data, textStatus, xmlRequest)
{
$("Results > Hint", data).each(function (index)
{
$("#" + $("> FieldId", this).text()).attr
("title", $("> " + hintSelector, this).text());
})
},
beforeSend: function (data, textStatus, xmlRequest) { },
complete: function (data, textStatus, xmlRequest) { },
error: function (data, textStatus, xmlRequest) { }
})
}
The webGetHints page returns something like this, which is pulled from a table of values maintained by the client.
<?xml version="1.0" encoding="utf-8" ?>
<Results>
<Hint>
<FieldId>getUserLeft</FieldId>
<HintEn>Select items from this list for the "Authors" field and then click the move selected [>] button.</HintEn>
<HintFr>Sélectionnez les éléments de cette liste pour les «auteurs» des champs puis cliquez sur le mouvement sélectionné touche [>].</HintFr>
</Hint>
</Results>
I've left out the bit that handles updating the title attribute dynamically to classes as well as id's and the error handling and such. This all works rather well, but the client wants the tooltips style and functionality not just the browser's display of the title attribute.