Hi,
I am trying to get a script to work that I have taken from a freebie site (javascriptkit.com). The script works fine, but now I want to change it slighty.
I am using a frameset (I have a top frame named top and undeath that left frame, called side and of course the main frame window which is not need here.
I would like to get the
to display in the top frame when I roll over the links in the side menu.
The code is provided below for the normal script, can anyone work out the communication needed to get the
to work in the other frame??
This goes in the head
and this in the body
This is the code to do with the link
Hope someone can figure that out ok!
Cheers in advance
James
I am trying to get a script to work that I have taken from a freebie site (javascriptkit.com). The script works fine, but now I want to change it slighty.
I am using a frameset (I have a top frame named top and undeath that left frame, called side and of course the main frame window which is not need here.
I would like to get the
Code:
div tag
The code is provided below for the normal script, can anyone work out the communication needed to get the
Code:
div
This goes in the head
Code:
<STYLE>
/* This is for Netscape 4.0+ broswsers so that the border will display. If you want to modify the background color this
is where you would do it for NS4.0+. To modify the color for IE and NS6 do so in the style tag in the div below
*/
.ttip {border:1px solid black;font-size:12px;layer-background-color:lightyellow;background-color:lightyellow}
</STYLE>
<script>
//Script created by Jim Young ([URL unfurl="true"]www.requestcode.com)[/URL]
//Submitted to JavaScript Kit ([URL unfurl="true"]http://javascriptkit.com)[/URL]
//Visit [URL unfurl="true"]http://javascriptkit.com[/URL] for this script
//Set the tool tip message you want for each link here.
var tip=new Array
tip[0]='Click to discover the Groovy World of BigW1'
tip[1]='Learn about BigW1s exciting Career to date'
tip[2]='Providing exclusive 1-on-1 lessons in Singing, Keyboarding and Drumming'
tip[3]='Listen to some of the Groove injected Tracks'
tip[4]='Photos of the Groovemaster himself, BigW1'
tip[5]='Get in contact with the BigW1'
tip[6]='Find out where the BigW1 is playing next!!!!'
function showtip(current,e,num)
{
if (document.layers) // Netscape 4.0+
{
theString="<DIV CLASS='ttip'>"+tip[num]+"</DIV>"
document.tooltip.document.write(theString)
document.tooltip.document.close()
document.tooltip.left=e.pageX+14
document.tooltip.top=e.pageY+2
document.tooltip.visibility="show"
}
else
{
if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
{
elm=document.getElementById("tooltip")
elml=current
elm.innerHTML=tip[num]
elm.style.height=elml.style.height
elm.style.top=parseInt(elml.offsetTop+elml.offsetHeight)
elm.style.left=parseInt(elml.offsetLeft+elml.offsetWidth+10)
elm.style.visibility = "visible"
}
}
}
function hidetip(){
if (document.layers) // Netscape 4.0+
{
document.tooltip.visibility="hidden"
}
else
{
if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
{
elm.style.visibility="hidden"
}
}
}
</script>
and this in the body
Code:
<div id="tooltip" style="position:absolute;visibility:hidden;border:1px solid
black;font-size:11px;layer-background-color:lightyellow;background-color:lightyellow;padding:0px"></div>
This is the code to do with the link
Code:
<a href="" onMouseover="showtip(this,event,'0')" onMouseOut="hidetip()"><img
src="../images/intro.gif" width="110" height="20"></a>
Hope someone can figure that out ok!
Cheers in advance
James