PDA

View Full Version : DHTMLTooltip



WorldofSad
11-04-2005, 11:57 PM
http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm
I have used this excellent script, however I would like to combine it with this script so that the var unused numbers appears as the tooltip text. I'm sure its a simple fix, but I just can't do it.

onFocus="showTooltip(this)"
function showTooltip(elem)
{
var a = elem.form.elements['A1_1'].value;
var b = elem.form.elements['A1_2'].value;
var c = elem.form.elements['A1_3'].value;
var masterString = "123456789";
var notUsed = masterString.replace(a,'').replace(b,'').replace(c,'');
var notUsedArray = notUsed.split()
Now get noteusedarray to tooltip text?

In my pageload event I have this:
A1_4.Attributes.Add("onMouseover", "ddrivetip(showTooltip('A1_4'),'yellow',300)")
A1_4.Attributes.Add("onMouseout", "hideddrivetip()")

Can you please help as I've been fiddling about this for ages and just can't do it.