Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with windows pop-ups 1

Status
Not open for further replies.

fterrazas

Technical User
Dec 29, 2000
43
ES
Hi, I would like to know how can I do this, I need some code that when the mouse y over a word(like a "hotword") then automatically without clicking show me a window with some explanations about this word, it is possible? Thanks.
 
You should be able to adapt this code that came from javascript.internet.com --


<!-- TWO STEPS TO INSTALL LINK DESCRIPTION:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Original: Danny Mc Neill (danny@mc-neill.co.uk) -->
<!-- Web Site: -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->

<!-- Begin
var description = new Array();
description[0] = &quot;Text shown when visitors mouse over the first link.&quot;;
description[1] = &quot;You can even embed <b>HTML</b> into the link description.&quot;;
description[2] = &quot;<i>Text shown when visitors mouse over the third link.</i>&quot;;
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<table border=&quot;0&quot;>
<tr>
<td valign=top width=&quot;160&quot;>
<ul>
<li><a onMouseOver=&quot;Words.innerHTML = description[0];&quot; href=&quot;link1.htm&quot;>First Link</a>
<li><a onMouseOver=&quot;Words.innerHTML = description[1];&quot; href=&quot;link2.htm&quot;>Second Link</a>
<li><a onMouseOver=&quot;Words.innerHTML = description[2];&quot; href=&quot;link3.htm&quot;>Third Link</a>
</ul>
</td>
<td width=&quot;600&quot;>
<!-- Cell with the descriptions -->
<a id=&quot;Words&quot;>This will be the info that visiters will see first it is changed when they mouseover the links. It returns when the page is reloaded.</a>
</td>
</tr>
</table>
</center>

<p><center>
<font face=&quot;arial, helvetica&quot; size=&quot;-2&quot;>Free JavaScripts provided<br>
by <a href=&quot; JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.51 KB -->

hope it helps! :)
Paul Prewett
penny.gif
penny.gif
 
hie guyz!
well, as it works in ie & nn6 i think u can just use <div title=’explanation’>a word</div> – it works too, but it is much simplier

for dyin nn4x – use <ilayer id=one><layer id=two><div id=three style=”position:relative”>the place for explanation</div></layer></ilayer>

and then –
for ie & nn6 – like link said,
if(document.getElementById) document.getElementById(“three”).innerHTML=’new explanation’
else if(document.all) document.all.three.innerHTML=’new explanation’

and for nn4:
else if (document.layers){
document.layers.one.document.layers.two.document.open()
document.layers.one.document.layers.two.document.write(’new explanation’)
document.layers.one.document.layers.two.document.close()
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top