<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial>Troy and Others;</FONT></DIV>
<DIV><FONT face=Arial>I sent an earlier reply (which has not appeared) to
Peter's suggestion -- the same as you comment Troy. They fixed my
problem.</FONT></DIV>
<DIV><FONT face=Arial>I do not have a onmouseout handler because the
toggle is used to help a student through a math problem</FONT></DIV>
<DIV><FONT face=Arial>The page comes up with all steps hidden, the student can
reveal each step as desired and they remain visible so that in the end the
entire problem solution is revealed. If the student desires, he can then
hide all the steps (by mousing over each step)</FONT> <FONT
face=Arial>and try again to solve the problem on his own.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Nick, thanks for your explanations. They help me
understand.</FONT></DIV>
<DIV><FONT face=Arial>In answer to your suggestion to toggle the className
</FONT></DIV>
<DIV><FONT face=Arial>The page (and other pages) contain many spans with class =
"hidden_hint" -- there appearance is controlled with CSS which references that
class.</FONT></DIV>
<DIV><FONT face=Arial>However, a mouseOver should only toggle
the one particular hint involved -- the one identified by the
id.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial>If this is not clear, you can view the results by going
to</FONT></DIV>
<DIV><FONT face=Arial><A
href="http://www.drdelmath.com/meramec_college_algebra/chapter_summaries/college_algebra_summary_chapter_1.html">http://www.drdelmath.com/meramec_college_algebra/chapter_summaries/college_algebra_summary_chapter_1.html</A></FONT></DIV>
<DIV><FONT face=Arial>and click on an "Examples" menu item at the bottom of some
unit -- the one at the end of Equations: Linear Equations in One
Variable is where the problem occurred -- but the others also demonstrate what I
am doing.</FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Thanks to everyone for the help.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Del</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=trojani2000@hotmail.com href="mailto:trojani2000@hotmail.com">Troy
III Ajnej</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@latech.edu
href="mailto:javascript@latech.edu">[JavaScript List]</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, June 05, 2007 8:55
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Javascript] Trouble with
id</DIV>
<DIV><BR></DIV>Helo Del,<BR>this code works as expected on both, IE
and FX (strictmode): <BR> <BR><a href="#" onMouseOver =
toggle_visibility('hint4')><BR><img src="../../image/icon_toggle.jpg"
width="22" height="22" border="0"></a><BR><span class =
"hidden_hint" id=hint4><BR> Add -<BR> <img
src="../images/sq_root_7.gif" align="absmiddle"><BR> to both sidesof
the equation.<BR></span><BR> <BR>function toggle_visibility(id)
{<BR> var e = document.getElementById(id);<BR>
if(e.style.visibility != 'visible')<BR> e.style.visibility =
'visible';<BR> else<BR> e.style.visibility = 'hidden'; <BR>}
<BR> <BR>One thing I don't understand is what's the use of a toggle
function if<BR>there is no "onmouseout" event defined? Since you'll have to
mouseover<BR>twice to toggle it, consider defining the mouseout
also:<BR><BR><a href="#"onMouseOver = toggle_visibility('hint4')
<BR>onMouseOut =
toggle_visibility('hint4')><BR>...<BR><BR>Regards<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<BR>
Troy III
<BR>
progressive art
enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><BR><BR><BR>
<HR id=stopSpelling>
<BR>> From: del@delweg.com<BR>> To: javascript@LaTech.edu<BR>> Date:
Mon, 4 Jun 2007 22:13:51 -0500<BR>> Subject: [Javascript] Trouble with
id<BR>> <BR>> Good Day;<BR>> <BR>> This is the JavaScript
function<BR>> function toggle_visibility(id)<BR>> {<BR>> var e =
document.getElementById(id);<BR>> if(e.style.visibility !=
'visible')<BR>> e.style.visibility = 'visible';<BR>> else<BR>>
e.style.visibility = 'hidden';<BR>> }<BR>> <BR>> This is the HTML
which does the calling<BR>> <a href="#" onMouseOver =
toggle_visibility(104)><BR>> <img src="../../image/icon_toggle.jpg"
width="22" height="22" <BR>> border="0"></a><BR>> <span
class = "hidden_hint" id=104><BR>> Add -<img
src="../images/sq_root_7.gif" align="absmiddle"> to both sides<BR>> of
the equation.<BR>> </span><BR>> <BR>> This works fine when I
use a number for the id.<BR>> However I would prefer(reasons involve the
rest of the page) to use "hint4" <BR>> for the ID<BR>> When I use hint4
with or without quotes, the whole toggle fails.<BR>> An ALERT inserted in
the function returns object for id when I use hint4<BR>> and returns the
number when I use a number.<BR>> <BR>> I do not understand.<BR>> Can
someone explain what goes wrong when I use id = hint4 ?<BR>> <BR>>
Thanks for any help.<BR>> <BR>> Del<BR>> <BR>> <BR>>
_______________________________________________<BR>> Javascript mailing
list<BR>> Javascript@LaTech.edu<BR>>
https://lists.LaTech.edu/mailman/listinfo/javascript<BR><BR><BR>
<HR>
Play free games, earn tickets, get cool prizes! Join Live Search
Club. <A
href="http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink"
target=_new>Join Live Search Club!</A>
<P>
<HR>
<P></P>_______________________________________________<BR>Javascript mailing
list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></BLOCKQUOTE></BODY></HTML>