<DIV>Hi</DIV>
<DIV>Code below gives me :form.length is null or not an object.</DIV>
<DIV>Any tips appreciated.</DIV>
<DIV>Tahns</DIV>
<DIV> </DIV>
<DIV><%@ page language="java"%><BR><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %><BR><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %><BR><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %></DIV>
<DIV><BR><html><BR><head></DIV>
<DIV><style><!--<BR>body,td,a,p,.h{font-family:times new roman,arial,sans-serif;}<BR>.h{font-size: 20px;}<BR>.q{text-decoration:none; color:#0000cc;}<BR>//--><BR></style><BR><% com.dynetics.gmpm.rad.Principal pl = (com.dynetics.gmpm.rad.Principal) session.getAttribute("principal");<BR>if(pl != null)System.out.println("*** principal is not null");<BR> if(pl == null) {<BR> %><BR> <jsp:forward page="logout.jsp"/><BR> <%<BR> }<BR> com.dynetics.gmpm.rad.PrincipalHolder.setPrincipal(pl);<BR> %></DIV>
<DIV><SCRIPT LANGUAGE="JavaScript"><BR>var checkflag = "false";<BR>function check(field) {<BR>if (checkflag == "false") {<BR>for (i = 0; i < field.length; i++) {<BR>field[i].checked = true;}<BR>checkflag = "true";<BR>return "Uncheck All"; }<BR>else {<BR>for (i = 0; i < field.length; i++) {<BR>field[i].checked = false; }<BR>checkflag = "false";<BR>return "Check All"; }<BR>}</DIV>
<DIV> </DIV>
<DIV>function set(target) {document.forms[0].dispatch.value=target;}<BR></script></DIV>
<DIV></head></DIV>
<DIV><body><BR><table border="0" width="100%"><BR> <tr><BR> <td bgcolor="00007D" align="center"><BR> <font color=white size="6"><b><u>Drivers</u></b></font><BR> </td><BR></tr><BR></table><BR><table><BR> <tr><BR><td align="right"><BR> <input type="hidden" name="finalDeleteArray"<BR> value="return getCheckedItems();"><BR> <input type="button" name="Delete" value= "Delete" onClick="getCheckedItems()"> <BR> </td><BR> <td align="right"><BR> <a
href="driver_new.jsp" target="frame_main"><input type="button" name="Add" value= "Add" onClick="window.location.href='driver_new.jsp'"></a><BR> </td><BR> <BR> <BR> </tr><BR></table><BR><html:form action="display" name="displayForm" type="com.servlet.DisplayForm" > <BR><table border="1" width="100%"></DIV>
<DIV> <BR><tr><BR><th><input type=checkbox name="d_all" value="Check All" onClick="check(this.form.list)"></th><BR><th><a href="drivers.jsp">Last name</a></th><BR><th><a href="drivers.jsp">First Name</a></th><BR><th><a href="drivers.jsp">Middle Name</a></th><BR><th><a href="drivers.jsp">Clock #</a></th></DIV>
<DIV><BR></tr></DIV>
<DIV><tr align="left"><BR> <td align="center"><!--input type=checkbox name="list"--><BR> <input type=checkbox name="list" value="0"></DIV>
<DIV> </td><BR> <td align="center"><BR> Smith<BR> </td><BR> <td align="center"><BR> Ashley<BR> </td><BR> <td align="center"><BR> K<BR> </td><BR> <td align="center"><BR> <a href="driverDisplay.do?employeeID=asmith"><BR> asmith<BR> </a><BR> </td><BR> <td align="center"><BR> <BR> </td><BR> <td
align="center"><BR> new driver<BR> </td><BR></tr><BR> </DIV>
<DIV> <tr align="left"><BR> <td align="center"><!--input type=checkbox name="list"--><BR> <input type=checkbox name="list" value="1"></DIV>
<DIV> </td><BR> <td align="center"><BR> David<BR> </td><BR> <td align="center"><BR> John<BR> </td><BR> <td align="center"><BR> V<BR> </td><BR> <td align="center"><BR> <a href="driverDisplay.do?employeeID=jdavid"><BR> jdavid<BR> </a><BR> </td><BR> <td align="center"><BR> <BR> </td><BR> <td
align="center"><BR> Novice<BR> </td><BR></tr><BR> </DIV>
<DIV> <tr align="left"><BR> <td align="center"><!--input type=checkbox name="list"--><BR> <input type=checkbox name="list" value="2"></DIV>
<DIV> </td><BR> <td align="center"><BR> Doe<BR> </td><BR> <td align="center"><BR> John<BR> </td><BR> <td align="center"><BR> K<BR> </td><BR> <td align="center"><BR> <a href="driverDisplay.do?employeeID=jdoe"><BR> jdoe<BR> </a><BR> </td><BR> <td align="center"><BR> Doe, John K(jdoe)<BR> </td><BR> <td
align="center"><BR> novice<BR> </td><BR></tr></DIV>
<DIV></table></DIV>
<DIV></html:form> <BR><SCRIPT LANGUAGE="JavaScript"><BR>function getCheckedItems()</DIV>
<DIV>{<BR> var value = false;<BR> menus = new Array;<BR> var msg = "";</DIV>
<DIV> var checkBoxes = driversDisplayForm.elements["list"];</DIV>
<DIV><BR>for(var i = 0; i < checkBoxes.length; i++)<BR> {<BR> if(checkBoxes[i].checked)<BR> {<BR> menus = menus+","+i;<BR> <BR> value = true; <BR> }<BR> }</DIV>
<DIV>menusChopped = menus.substr(1,menus.length-1);//chop leading comma<BR>deleteArray = new Array;</DIV>
<DIV>deleteArray = menusChopped.split(",");<BR>finalDeleteArray = new Array;</DIV>
<DIV><BR> for (i=0;i<deleteArray.length;i++){<BR> finalDeleteArray[i]= deleteArray[i];<BR> alert(finalDeleteArray[i]);<BR> }</DIV>
<DIV> </DIV>
<DIV>if(!value)<BR> alert("Check at least one of the checkboxes, thanks.");</DIV>
<DIV><BR>//this.form.action="<A href='http://myserver.com/searchById/submit.do";//fix'>http://myserver.com/searchById/submit.do";//fix</A> this<BR>//window.location.href='deleteDriver.do';<BR>return finalDeleteArray;<BR>}<BR></script></DIV>
<DIV><BR></body><BR></html><BR></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Search - <a href="http://search.yahoo.com/?fr=ad-mailsig-home">Find what you’re looking for faster.</a>