you have to add a </script> immediately after the opening tag. also, some browsers will only run a script if the mime type is one they recognize. try renaming your script file to formscripts.js.
as to the script itself, i don't see anything wrong with it, but I haven't yet manipulated form elements through the DOM api yet. Jason > -----Original Message----- > From: kiuma [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 10, 2002 11:43 AM > To: Struts Users Mailing List > Subject: javascript help > > > The previous problem was on <script> tag. > > > <head> > > <html-el:base/> > <title><bean-el:message key="title.userfinder"/></title> > <link rel="stylesheet" href="../css/common.css" TYPE="text/css"/> > <link rel="stylesheet" href="../css/anagr.css" TYPE="text/css"/> > > <SCRIPT language='JavaScript' src='../scripts/formscripts.txt'> > > </head> > > this is formscrpts.txt > > > function selectAllChk( fromName, chkBoxName ) > { > var chkboxes = document.getElementsByTagName( 'input' ); > for (i=0; i < chkboxes.length; i++) { > if (( chkboxes.item(i).getAttribute('type') == 'checkbox' ) & > ( chkboxes.item(i).getAttribute('name') == chkBoxName ) ) > { > chkboxes.item(i).checked =! > chkboxes.item(i).checked; > } > } > } > > > What's wrong with it? Why inserting tag <SCRIPT language='JavaScript' > src='../scripts/formscripts.txt'> doesn't make my app start? > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>