in reply to Re: Re: Java script question
in thread Java script question

Well, If it is still generating errors you probably should post the pop and/or kill functions. I tested the small (corrected) block above and it worked fine for me ( using fake pop/kill functions )

Replies are listed 'Best First'.
Re: Re: Re: Re: Java script question
by swarddb (Novice) on Aug 02, 2001 at 22:48 UTC
    Here is the pop and kill function snipped straight from the cgi. Thanks for your help !me.
    <style TYPE="text/css"> <!-- body{ overflow:scroll;overflow-x:hidden } .popper { position : absolute; visibility : hidden; } //--> </style>
    <SCRIPT> var nav = (document.layers); var iex = (document.all); var skn = (nav) ? document.topdeck : topdeck.style; if (nav) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = get_mouse; function pop(msg,bak) { var content ="<TABLE WIDTH=130 BORDER=0 CELLPADDING=2 CELLSPACING=0 BG +COLOR=#000000><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSP +ACING=0><TR><TD><CENT ER><FONT COLOR=#FFFFFF SIZE=2><B>Detailed Info</B></FONT></CENTER></TD +></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 +BGCOLOR="+bak+"><TR>< TD><FONT COLOR=#000000 SIZE=2><CENTER>"+msg+"</CENTER></FONT></TD></TR +></TABLE></TD></TR></TABLE>"; if (nav) { skn.document.write(content); skn.document.close(); skn.visibility = "visible"; } else if (iex) { document.all("topdeck").innerHTML = content; skn.visibility = "visible"; } } function get_mouse(e) { var x = (nav) ? e.pageX : event.x+document.body.scrollLeft; var y = (nav) ? e.pageY : event.y+document.body.scrollTop; skn.left = x - 60; skn.top = y+20; } function kill() { skn.visibility = "hidden"; } </SCRIPT>
      First thing I would do is compare the output of the cgi to the html embedded within the cgi, make sure its not getting mangled. Second, you might want to make sure the JavaScript doesn’t start until the body is loaded by either

      1. Moving the script to after the body tags
      2. Wrapping the main part of the script within a function call that is called after the body ( or target object ) loads.