Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsHi!
I found this great little DHTML routine that is perfect for a glossary I am adding. The original is here:http://migoicons.trip
Here's the DHTML basics:
1. Every tip message is created from a combination of one Text array and one Style array the word array in JavaScript means collection.
2. The Text and the Style arrays consist the tip message's configuration values.
3. Every Text and Style have a index number which will be used as a reference to them.
4. The index number of the Text and Style array should be consecutive e.g. Text[0],Text[1] , Style[0],Style[1].
5. You then implement the tips in the links [(A) tags or href tags] by using the STM function which means show tip message.
6. In the STM function you choose which Text and Style array or in other words configuration will be used for this tip.
And code basics of:
<HTML>
<HEAD>
// Make sure that you upload the main15.js to your server and include a link to it as the following
<SCRIPT language="JavaScript1.2" src="main15.js" type="text/javascript""></
<TITLE></TITLE>
</HEAD>
<BODY>
<DIV id="tiplayer" style="visibility:hidden;p
<SCRIPT language="JavaScript1.2" >
Text[0]=["this is title one","this is text one"]
Text[1]=["this is title two","this is text two"]
Text[2]=["this is title three","this is text three"]
Style[0]=["white","","",""
var TipId="tiplayer" // should be the same as <div> tag's id
var FiltersEnabled = 1 // should be the set as to 1 if your going to use visual effects if not set to 0
mig_clay()
</SCRIPT>
// Now that we created our Text and Style arrays needed lets implement them in the link tags by using a reference to the arrays by their index number in the STM function
<a href="your url" onMouseOver="stm(Text[0],S
<a href="your url" onMouseOver="stm(Text[1],S
<a href="your url" onMouseOver="stm(Text[2],S
I have it so that the list of items is showing, and know that there is an error in the output query:
<option value=<a href="#" onMouseOver="stm(Text[#rs_
I also figure that I need to set the Text Array somehow to the query names but again am not sure how to do it. Right now it is not throwing an error except this one:
An expression that began on line 46, column 38.
Your expression might be missing an ending "#" (it might look like #expr ).
The body of a cfoutput tag beginning on line 45, column 14.
The error occurred in C:\CFusionMX\wwwroot\mysti
44 : <select name="select" size="10">
45 : <cfoutput query="rs_gloss">
46 : <option value=<a href="#" onMouseOver="stm(Text[#rs_
47 : </cfoutput> </select>
48 : </div></td>
Can anyone help me understand the dynamics better and see what needs tweaking???
BTW: Here's the code for the complete page:
<cfquery name="rs_gloss" datasource="mmdb">
SELECT GlossID, Word, Definition FROM Glossary ORDER BY Word ASC
</cfquery>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Glossary</title>
<SCRIPT language="JavaScript1.2" src="main15.js" type="text/javascript""></
<link href="../organized.css" rel="stylesheet" type="text/css">
</head>
<body>
<DIV id="glossary" style="visibility:hidden;p
<script language="JavaScript1.2" type="text/javascript">
/*
Pleas leave this notice.
DHTML tip message version 1.5 copyright Essam Gamal 2003.
Home Pag: http://migoicons.tripod.co
Email migoicons@hotmail.com
Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.c
*/
Text[#rs_gloss.GlossID#]=[
Style[0]=["white","000099"
var TipId="tiplayer" // should be the same as <div> tag's id
var FiltersEnabled = 0 // should be the set as to 1 if your going to use visual effects if not set to 0
mig_clay()
</SCRIPT>
<table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><p align="center" class="blackheadline">To see any definition simply place your cursor over the name and a definition will appear. <br>
<br>
</p></td>
</tr>
<tr>
<td><table width="248" border="1" cellspacing="1" cellpadding="1">
<tr>
<td><div align="center">
<select name="select" size="10">
<cfoutput query="rs_gloss">
<option value=<a href="#" onMouseOver="stm(Text[#rs_
</cfoutput> </select>
</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
Thanks!
Betty
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: MausePosted on 2005-06-26 at 07:38:22ID: 14303702
Comments are available to members only. Sign up or Log in to view these comments.