Really annoying coding question

Ok, here’s the fancy dancy one. It (of course requires two files):

Maindoc.htm



<HTML>
<HEAD>
<TITLE> Main Document </TITLE>
  <SCRIPT language ="javascript" runat = "client">
    function showWindow(strWord){
      var file = "child.htm#" + strWord;
      window.open(file,null,'height = 50,
      width =200,top = 200,left = 300, scrollbars =1'
      ,true);
    }

  </script>	
</head>

<BODY>
Some people like
<A onclick = showWindow(this.innerText)
style = "color:blue;text-decoration: underline"> apple</a>s ,
but I prefer <A onclick = showWindow(this.innerText)
style = "color:blue;text-decoration: underline">banana</A>s.
</body>
</html>


Defs.htm



<HTML>
<HEAD>
  <TITLE>Definitions </TITLE>
  <STYLE type="text/css">
  <!--
  A {
     font-size: 15 px;
     font-weight: bold;
     font-family:Arial, sans-serif;
     color: blue;
    }
  h2{
     font-size: 10 px;
     font-family:Arial, sans-serif;
     color:#000000;
     text-indent: 20 px;
    }
  -->
  </STYLE>

</HEAD>
<BODY bgcolor =	#ffffcc	   onclick = "close();">
<A name	= Apple>Apple</A>
<H2>The apple is a tasty fruit</H2>

<A name	= Banana>Banana</A>
<H2>Time flies like the wind, fruit flies like
bananas	</H2>

</BODY>
</HTML>


The basic premise is that in the main doc words that you want to define are wrapped with <A> tags that define their style and call the showWindow funcition passing the text that is contained. The contained text cooresponds to an anchor in the definition file. As the new window is being open we change its size and position, load the page, and then move to the definition.

Let me know if you need more help.

Okay . . . I think I got it. I fuddled around with some code I got from cessandra and basically did a bit of javacode beforehand, put it in, then referred the html back to it. I’ll worry about placement when I get the paper written . . .

Thanks to all who helped. I will doubtless be back later on this week for more help:)