What is wrong with this javascript syntax?
<p>I want to open a new window with a textfield that copies what you write into multiple text boxes, here is what i have to be inserted into the <code>&lt;body&gt;</code>.  When I copy my code into my perl file, everything after this colored as it's included in the html as if my flags are messed up.</p>

<pre><code>&lt;span class=DefMenuText&gt;(click on "input" to open the new window)&lt;/span&gt;
&lt;form name=form&gt;
&lt;span class=PreText&gt;externalID:&lt;/span&gt;
    &lt;input type=text name=externalID size=12&gt;
    &lt;span class=BodyText&gt;[&lt;a href="javascript:fill(
        'External ID',
        'opener.document.form.external_id.value',
        '&lt;font face=Verdana size=2&gt;' +
    'test' );"
    &gt;input&lt;/a&gt;]&lt;/span&gt;

&lt;br&gt;
&lt;span class=PreText&gt;Cage:&lt;/span&gt;
    &lt;input type=text name=password size=10&gt;
    &lt;span class=BodyText&gt;[&lt;a href="javascript:fill(
        'cage',
        'opener.document.form.cage.value',
        '&lt;font face=Verdana size=2&gt;' +
    'test1');"
    &gt;input&lt;/a&gt;]&lt;/span&gt;

&lt;br&gt;
&lt;span class=PreText&gt;Born:&lt;/span&gt;
    &lt;input type=text name=password size=10&gt;
   &lt;span class=BodyText&gt;[&lt;a href="javascript:fill(
        'born',
        'opener.document.form.born.value',
        '&lt;font face=Verdana size=2&gt;' +
    'test2' );"
    &gt;input&lt;/a&gt;]&lt;/span&gt;

&lt;br&gt;
&lt;span class=PreText&gt;Comment:&lt;/span&gt;
    &lt;input type=text name=password size=10&gt;
    &lt;span class=BodyText&gt;[&lt;a href="javascript:fill(
        'comment',
        'opener.document.form.comment.value',
        '&lt;font face=Verdana size=2&gt;' +
    'test3' );"
    &gt;input&lt;/a&gt;]&lt;/span&gt;

    &lt;/form&gt;
</code></pre>

<p>Here is the javascript function, it uses $mouse which counter variable in the perl script to  count how many cages are available for mice to be used, and I'm using it as a counter to see how many fields need to be filled at any given time.</p>

<pre><code>function fill( name, output, msg ) {
    newwin = window.open( '', '', 'top=80,left=60,width=350,height=200' );
    if ( !newwin.opener ) newwin.opener = self;
    newwin.opener.document.bgColor = "EBEBEB";
        with ( newwin.document ) {
        open();
        write( '&lt;body onLoad="document.form.box.focus()"&gt;' );
    write( '&lt;form name=form ' );
        write( '    onSubmit=opener.document.bgColor="EAE8E4";window.close()&gt;' );
        write( msg );
        write( '&lt;br&gt;' );
        write( '&lt;font face=Verdana size=2&gt;' );
        write( '&lt;p&gt;You may enter your ' + name + ' here ' );
        write( '&lt;center&gt;' + name + ':' );
        write( '&lt;/font&gt;' );
        for (int i = 1; i &lt;= $mouse; i++)
        {
            write( '&lt;input type=text name=box size=10 onKeyUp=' + output + '_' + i + '=this.value&gt;' );
        }
        write( ' ' );
        write( '&lt;input type=submit value="Finish"&gt;' );
        write( '&lt;/center&gt;&lt;/form&gt;' );
        close();

    }
}
</code></pre>

<p>Any help would be appreciated, thanks.</p>
