jcbmtt
asked on
populate values
i am trying to populate list of friends numbers (1,2,3,4,6) as links and show their names (friend name 1, friend name 2 etc ) in a tooltip on mouseover. pl advice.
<html>
<head>
<script>
for (var i=0; i < 6; i++)
{
friends.innerHTML += "<a href='javascript:void();'>" + friends[i].name + "</a>";
}
</script>
</head>
<body>
<div id="friends></div>
</body>
</html>
Try this attached code
Friends.txt
Friends.txt
@sankhe_dipti
1) Why attach a file when you can post the code
2) you are not adding anything to the discussion:
1) Why attach a file when you can post the code
2) you are not adding anything to the discussion:
You do not access the div correctly
You use javascript: prefix which is not necessary
You add complexity with visibility and show/hide
ASKER
mp,
i am looking for tooltip to show corresponding names to the links. i am not able to see that in the code.
my question again :
i am trying to populate list of friends numbers (1,2,3,4,6) as links and show their names (friend name 1, friend name 2 etc ) in a tooltip on mouseover. pl advice.
i am looking for tooltip to show corresponding names to the links. i am not able to see that in the code.
my question again :
i am trying to populate list of friends numbers (1,2,3,4,6) as links and show their names (friend name 1, friend name 2 etc ) in a tooltip on mouseover. pl advice.
Put the name in the title of the link
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
exactly. thanks.
2) you need to do this onload
3) you need an object array
DEMO
Open in new window