PDA

View Full Version : Mouseover



lpscal
11-07-2004, 03:53 PM
Script - Mouseover

I am using the coding to Mouseover (of an image) that is found at Dynamic Drive's web site at: http://www.dynamicdrive.com/dynamic...olltool_dev.htm

Questions:
1- How can I change the scrolling text from blue to red?
2- How can I make the size of the scrolling text larger?
3- How can I make the scrooling text bold face?
4- When I mouseover the image, the scrolling text does not appear immediately in the yellow backgrounded tooltip. The tooltip appears immediately, but the text does not start to scroll for several seconds. How is it possible to make the scrolling text appear immediately?

In addition to responding to the forum, could you please copy me at lpsca@earthlink.net

Thanks for your help!

Larry

cr3ative
11-07-2004, 05:00 PM
The link to the script is dead, can you specify again which one you are using?

Cheers
cr3ative

(I don't send emails.)

lpscal
11-07-2004, 05:08 PM
http://www.dynamicdrive.com/dynamicindex5/scrolltool_dev.htm

cr3ative
11-07-2004, 05:49 PM
Righty then:

Use this:

onMouseover="showtip2(this,event,'<font face=Tahoma><font color=red>Visit Dynamic Drive for DHTML Scripts</font>')"

This changes font to Tahoma and colour to Red. To make it bold, use <b> and </b> tags.

Normally, we would use "Tahoma" or 'Tahoma', but if we did that here an error would occour, so remember to leave them out.

cr3ative

lpscal
11-07-2004, 07:37 PM
Where do you suggest that I should insert the below coding that you suggested?

onMouseover="showtip2(this,event,'<font face=Tahoma><font color=red>Visit Dynamic Drive for DHTML Scripts</font>')"

Below is the coding on my web page.


<script type="text/javascript">
/***********************************************
* Scrolling Tooltip Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function ietruebody(){ //Dynamicdrive added function
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
if (!document.layers&&!document.all)
event="test"
function showtip2(current,e,text){

if (document.all&&document.readyState=="complete"){
document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>'
document.all.tooltip2.style.pixelLeft=event.clientX+ietruebody().scrollLeft+10
document.all.tooltip2.style.pixelTop=event.clientY+ietruebody().scrollTop+10
document.all.tooltip2.style.visibility="visible"
}

else if (document.layers){
document.tooltip2.document.nstip.document.write('<b>'+text+'</b>')
document.tooltip2.document.nstip.document.close()
document.tooltip2.document.nstip.left=0
currentscroll=setInterval("scrolltip()",100)
document.tooltip2.left=e.pageX+10
document.tooltip2.top=e.pageY+10
document.tooltip2.visibility="show"
}
}
function hidetip2(){
if (document.all)
document.all.tooltip2.style.visibility="hidden"
else if (document.layers){
clearInterval(currentscroll)
document.tooltip2.visibility="hidden"
}
}

function scrolltip(){
if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width)
document.tooltip2.document.nstip.left-=5
else
document.tooltip2.document.nstip.left=150
}

</script>

cr3ative
11-08-2004, 02:02 PM
If you read the instructions to the script, you have to replace your current line of code with my one where it says onmouseover next to the actual object, try a text search for it.

cr3ative