Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop-down validation 2

Status
Not open for further replies.

3112005

Technical User
Nov 28, 2005
58
US
I've tried to get my drop-down menu to validate every which way, but no luck. Can someone take a look at my code and see what I need to do?

<CodeStart>

<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_required(name,"Name must be filled out!")==false)
{name.focus();return false}

if (validate_required(company,"Company must be filled out!")==false)
{company.focus();return false}

if (validate_required(address,"Address must be filled out!")==false)
{address.focus();return false}

if (validate_required(phone,"Phone must be filled out!")==false)
{phone.focus();return false}

if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false}

}
}

function msg(obj) {
if (obj.selectedIndex == 1) {
alert("Please select a system!");
}
}


</script>

</head><body>
<table width="550">
<form action="send.asp" name = ContactUs
onsubmit="return validate_form(this)"
method="post">

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Name:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="name" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Company:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="company" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Address:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="address" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Phone:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="phone" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Fax:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="fax" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Email:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="email" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Systems:&nbsp;
</font>
</TD><TD colspan="2">
<select size="1" type=select-one name="systems">
<option value="Not selected" selected>Please Select</option>
<option value="value 1">AS 350 IBF (STC pending)</option>
<option value="value 2">AGUSTA A119 IBF (STC pending)</option>
<option value="value 3">AH-64A APU IBF</option>
<option value="value 4">Bell 205/210 (STC pending)</option>
<option value="value 5">Bell 206L-1/C30 IBF (STC approved)</option>
<option value="value 6">Bell 206L-3/4 IBF (STC approved)</option>
<option value="value 7">Bell 206B/OH-58A/C IBF (STC approved)</option>
<option value="value 8">Bell 407 IBF (STC approved)</option>
<option value="value 9">CH-47 APU IBF</option>
<option value="value 10">OH-58D EBF</option>
<option value="value 11">MD 500 IBF (STC approved)</option>
<option value="value 12">UH-60 EIBF</option>
<option value="value 13">UH-60 APU IBF</option>
<option value="value 14">UH-1H IBF (STC pending - available for freedom of use)</option>
<option value="value 15">OTHER</option>
<option value="value 16">Spare Parts</option>
</select></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">General Comments: </font> </TD><TD colspan="2">
<textarea rows="5" name="Comments" cols="30"></textarea></TD></TR>

<TR><TD width="150">
&nbsp;</TD><TD colspan="2">
&nbsp;</TD></TR>

<TR><TD width="150">
&nbsp;</TD><TD width="67">
<p>
<input type="submit" value="Submit" style="float: right"></TD><TD width="324">
<INPUT type=reset value=" Reset "></TD></TR>

</form></table>
</body></html>

</CodeEnd>
 
The portion that deals with the "systems" field is function msg(), yet you're not calling that function anywhere in your form.

I rewrote the funtion and addinf the calling of it
Code:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
	with (field) {
		if (value==null||value=="") {
			alert(alerttxt);return false
		}
		else {return true}
		}
	}
	
function validate_form(thisform) {
	with (thisform) {
		if (validate_required(name,"Name must be filled out!")==false)
			{name.focus();return false}
  
		if (validate_required(company,"Company must be filled out!")==false)
		  {company.focus();return false}
		  
		if (validate_required(address,"Address must be filled out!")==false)
		  {address.focus();return false}
		  
		if (validate_required(phone,"Phone must be filled out!")==false)
		  {phone.focus();return false}
		  
		if (validate_required(email,"Email must be filled out!")==false)
		  {email.focus();return false}
	}
}

function msg() {
   if (document.ContactUs.systems[0].selected == true) {
      alert("Please select a system!");
	  return false
   }
}


</script>

</head><body>
<table width="550">
<form action="a.cfm" name = ContactUs onsubmit="return msg(), validate_form(this);" method="post">

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Name:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="name" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Company:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="company" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Address:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="address" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Phone:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="phone" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Fax:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="fax" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Email:&nbsp;
</font>
</TD><TD colspan="2">
<input type="text" name="email" size="30"></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">Systems:&nbsp;
</font>
</TD><TD colspan="2">
<select size="1" type=select-one name="systems">
<option value="Not selected" selected>Please Select</option>
<option value="value 1">AS 350 IBF (STC pending)</option>
<option value="value 2">AGUSTA A119 IBF (STC pending)</option>
<option value="value 3">AH-64A APU IBF</option>
<option value="value 4">Bell 205/210 (STC pending)</option>
<option value="value 5">Bell 206L-1/C30 IBF (STC approved)</option>
<option value="value 6">Bell 206L-3/4 IBF (STC approved)</option>
<option value="value 7">Bell 206B/OH-58A/C IBF (STC approved)</option>
<option value="value 8">Bell 407 IBF (STC approved)</option>
<option value="value 9">CH-47 APU IBF</option>
<option value="value 10">OH-58D EBF</option>
<option value="value 11">MD 500 IBF (STC approved)</option>
<option value="value 12">UH-60 EIBF</option>
<option value="value 13">UH-60 APU IBF</option>
<option value="value 14">UH-1H IBF (STC pending - available for freedom of use)</option>
<option value="value 15">OTHER</option>
<option value="value 16">Spare Parts</option>
</select></TD></TR>

<TR><TD width="150" align="right">
<font face="Verdana" size="2">General Comments: </font> </TD><TD colspan="2">
<textarea rows="5" name="Comments" cols="30"></textarea></TD></TR>

<TR><TD width="150">
&nbsp;</TD><TD colspan="2">
&nbsp;</TD></TR>

<TR><TD width="150">
&nbsp;</TD><TD width="67">
<p>
<input type="submit" value="Submit" style="float: right" [COLOR=red]onClick="return msg();"[/color]></TD><TD width="324">
<INPUT type=reset value=" Reset "></TD></TR>

</form></table>
</body></html>

I checked it in IE, NS and FF.

____________________________________
Just Imagine.
 
Thank you so much! I just waisted a whole day fooling with this thing and I probably would have waisted more.

Thanks again.

Your awesome!
 
I need to validate another dropdown in this page, but when I tried to duplicate the function msg() it doesn't validate it. Can you help?

Thanks!
 
Nevermind, I just wasn't getting the brackets in the right place. Sorry to bother you.
 
It's me again... back to bother you. I just realized that after I modified this code it no longer validates the first part where I am validating "Name, Last Name, Title, Contract"

Code:
<!--FORM FIELD VALIDATION-->

<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false}
else {return true}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(first_name,"Name must be filled out!")==false)
  {first_name.focus();return false}
  
if (validate_required(last_name,"Last Name must be filled out!")==false)
  {last_name.focus();return false}
      
if (validate_required(title,"TITLE must be filled out!")==false)
  {title.focus();return false}
     
if (validate_required(effective_date,"EFFECTIVE DATE must be filled out!")==false)
  {effective_date.focus();return false}
      
if (validate_required(contract,"CONTRACT must be filled out!")==false)
  {contract.focus();return false}

}
}

function msg() {
   if (document.PAN1.reports_to[0].selected == true) {
      alert("Please select a SUPERVISOR!");
	  return false
}

   if (document.PAN1.location[0].selected == true) {
      alert("Please select a LOCATION!");
	  return false
	  
}

   if (document.PAN1.sbd[0].selected == true) {
      alert("Please select a SBD!");
	  return false
	  
}
}

function validate_form(thisform)
{
with (thisform)
{
var validformat=/^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity
var returnval=false
if (!validformat.test(effective_date.value))
alert("Invalid Date Format. Please correct and submit again.")
else{ //Detailed check for valid date ranges
var monthfield=effective_date.value.split("/")[0]
var dayfield=effective_date.value.split("/")[1]
var yearfield=effective_date.value.split("/")[2]
var dayobj = new Date(yearfield, monthfield-1, dayfield)
if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield))
alert("Invalid Day, Month, or Year range detected. Please correct and submit again.")
else
returnval=true
}
if (returnval==false) effective_date.select()
return returnval
}
}

</script>

Code:
<form ACTION="<%=MM_editAction%>" name="PAN1" id="PAN1" language="JavaScript" onsubmit="return msg(), validate_form(this);" method="post">

 
what in the world is this?

Code:
onsubmit="return msg(), validate_form(this);"

try this:

Code:
onsubmit="return ( msg() && validate_form(this) );"



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
That onsubmit came from the person that responded to my last post before today.

I changed it to what you proposed and it did not make a difference. The form still submits without checking my first set of field boxes for name, title etc.

Thanks.
 
it did make a difference, you just don't know it yet.

do you have a link? it's impossible to test without the HTML and much easier to debug with your actual code rather than reading through each line.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
I can not provide a link it is for our intranet website. All I can do is give you the code. Was the javascript and form handler not enough? Let me know what else you need.

Thank you.
 
the best would be the complete relevant javascript (which you've already provided, but paste it again just to be sure) and the entire form, from opening to closing form tags.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Code:
<!--FORM FIELD VALIDATION-->

<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false}
else {return true}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(first_name,"Name must be filled out!")==false)
  {first_name.focus();return false}
  
if (validate_required(last_name,"Last Name must be filled out!")==false)
  {last_name.focus();return false}
      
if (validate_required(title,"TITLE must be filled out!")==false)
  {title.focus();return false}
     
if (validate_required(effective_date,"EFFECTIVE DATE must be filled out!")==false)
  {effective_date.focus();return false}
      
if (validate_required(contract,"CONTRACT must be filled out!")==false)
  {contract.focus();return false}

}
}

function msg() {
   if (document.PAN1.reports_to[0].selected == true) {
      alert("Please select a SUPERVISOR!");
	  return false
}

   if (document.PAN1.location[0].selected == true) {
      alert("Please select a LOCATION!");
	  return false
	  
}

   if (document.PAN1.sbd[0].selected == true) {
      alert("Please select a SBD!");
	  return false
	  
}
}

function validate_form(thisform)
{
with (thisform)
{
var validformat=/^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity
var returnval=false
if (!validformat.test(effective_date.value))
alert("Invalid Date Format. Please correct and submit again.")
else{ //Detailed check for valid date ranges
var monthfield=effective_date.value.split("/")[0]
var dayfield=effective_date.value.split("/")[1]
var yearfield=effective_date.value.split("/")[2]
var dayobj = new Date(yearfield, monthfield-1, dayfield)
if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield))
alert("Invalid Day, Month, or Year range detected. Please correct and submit again.")
else
returnval=true
}
if (returnval==false) effective_date.select()
return returnval
}
}

</script>



<div id="container">
<div id="topbanner">
<a href="/intranet/index.asp" id="homelink"></a>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td><!--#include virtual = "/intranet/menu/menu2.htm"--></td>
	</tr>
</table>
</div>
<div id="contentbox">

<div id="maincontent">
<div id="printlist">

<form ACTION="<%=MM_editAction%>" name="PAN1" id="PAN1" language="JavaScript" onsubmit="return ( msg() && validate_form(this) );" method="post">
<p class="wsdivname">New Hire &ndash;  Basic Employee Information:</p>
<input name="created_by" type="hidden" value="<%=(rsCurUser.Fields.Item("first_name").Value)%>&nbsp;<%=(rsCurUser.Fields.Item("last_name").Value)%>" />
<input name="last_editor" type="hidden" value="<%=(rsCurUser.Fields.Item("first_name").Value)%>&nbsp;<%=(rsCurUser.Fields.Item("last_name").Value)%>" />
<input name="hr_email" type="hidden" value="<%=(rsCurUser.Fields.Item("email_01").Value)%>" />
<input name="created_on" type="hidden" value="<%=FORMATDATETIME(NOW, VBSHORTDATE)%>" />
<input name="last_editor_date" type="hidden" value="<%=FORMATDATETIME(NOW, VBSHORTDATE)%>" />
<input name="STATUS" type="hidden" value="3" />

<table border="0" cellspacing="0" cellpadding="0" width="526">
	<tr>
		<td colspan="5">&nbsp;</td>
	</tr>
	
<!--CHECKBOX VALIDATION-->	
	<script type="text/javascript" language="javascript"> 
var freeItemCount=0 
var maxFreeItems=1

function setItems(item)
{ 
  if(item.checked)
  {freeItemCount=freeItemCount+1}

else
 {freeItemCount=freeItemCount-1} 

if (freeItemCount>maxFreeItems)
  {item.checked=false 
  freeItemCount=freeItemCount-1 
  alert('You may only choose '+maxFreeItems+' option. Please choose the '+maxFreeItems+' option you want us to include with this PAN. ')
 
  } 
} 
</script>
	 
  	<tr>
		<td width="260" valign="top" class="loclist">
		<input name="company" type="checkbox" id="A & DG" value="A & DG" onclick="setItems(this)"> 
      &ndash; <b>A & DG</b></td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td colspan="3" valign="top" class="loclist">
		<input name="company" type="checkbox" id="A & DG (Space & Missile, NCR, or COO SBUs)" value="A & DG (Space & Missile, NCR, or COO SBUs)" onclick="setItems(this)">
	&#8211; <b>A & DG</b> (Space & Missile, NCR, or COO SBUs)</td>
		</tr>
	<tr>
		<td width="260" valign="top" class="loclist">
		<input name="company" type="checkbox" id="AFS" value="AFS" onclick="setItems(this)">
	&#8211; <b>AFS </b> </td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td valign="top" class="loclist"><input name="company" type="checkbox" id="WDT" value="WDT" onclick="setItems(this)">
&ndash; <b>WDT</b></td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td width="109" valign="top" class="loclist">&nbsp;</td>
	</tr>
	<tr>
		<td width="260" valign="top" class="loclist">
		<input name="company" type="checkbox" id="SIMAUTHOR" value="SIMAUTHOR" onclick="setItems(this)">
	&#8211; <b>SIMAUTHOR </b> </td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td valign="top" class="loclist"><input name="company" type="checkbox" id="PIMSOL" value="PIMSOL" onclick="setItems(this)">
	&#8211; <b>PIMSOL</b></td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td width="109" valign="top" class="loclist">&nbsp;</td>
	</tr>
	
		<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	
		<tr>
		<td width="260" bgcolor="#EEEEEE">&nbsp;</td>
		<td width="4" bgcolor="#EEEEEE">&nbsp;</td>
		<td bgcolor="#EEEEEE">&nbsp;</td>
		<td bgcolor="#EEEEEE" width="4">&nbsp;</td>
		<td bgcolor="#EEEEEE" width="109">&nbsp;</td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	
	<tr>
		<td width="260"><font face="MS Sans Serif"><font size="2">First Name:<br>
		</font><input type="text" name="first_name" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td><font face="MS Sans Serif"><font size="2">Last Name:<br>
		</font><input type="text" name="last_name" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td width="109"><font face="MS Sans Serif"><font size="2">M.I.:<br>
		</font><input type="text" name="middle_initial" size="5"></font></td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	<tr>
		<td width="260"><font face="MS Sans Serif"><font size="2">Title:<br>
		</font><input type="text" name="title" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td colspan="3"><font face="MS Sans Serif" size="2">Effective Date: 
		</font><font face="MS Sans Serif" size="1">(MM/DD/YYYY)</font><font face="MS Sans Serif" size="2"><br>
		</font><font face="MS Sans Serif">
		<input type="text" name="effective_date" size="24"></font></td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td colspan="3"><font size="1" face="MS Sans Serif">(1st or 16th of 
		month if salary adj./promo.)</font></td>
	</tr>
      </select>
  </tr>
  </Table>
  
  
        
<Table>    

	<tr>
		
	<!--Supervisor Dropdown-->	
		<td valign="top" class="loclist" style="width: 260px;">Supervisor / Manager :<br />
        <select name="reports_to" id="reports_to" style="width: 260px;" size="1">
        <option selected>Please Select</option>
          <%
While (NOT rsManagers.EOF)
%>
          <option value="<%=(rsManagers.Fields.Item("user_id").Value)%>"><%=(rsManagers.Fields.Item("fullname").Value)%></option>
          <%
  rsManagers.MoveNext()
Wend
If (rsManagers.CursorType > 0) Then
  rsManagers.MoveFirst
Else
  rsManagers.Requery
End If
%>
</select></td>
<!--End Supervisor Dropdown-->
		
		<td width="4">&nbsp;</td>
		<td><font face="MS Sans Serif" size="2">Contract:<br>
		</font><font face="MS Sans Serif">
		<input type="text" name="contract" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	<tr>
		<td><font face="MS Sans Serif" size="2">Location:<br>
		</font><select name="location" id="location" style="width: 260px;" size="1">
		<option selected>Please Select</option>
        <%
While (NOT rsLocations.EOF)
%>
        <option value="<%=(rsLocations.Fields.Item("location_id").Value)%>"><%=(rsLocations.Fields.Item("location_name").Value)%></option>
        <%
  rsLocations.MoveNext()
Wend
If (rsLocations.CursorType > 0) Then
  rsLocations.MoveFirst
Else
  rsLocations.Requery
End If
%>
            </select></td>
		<td>&nbsp;</td>
		<td colspan="3"><font face="MS Sans Serif" size="2">SBD:</font><br>
		<select size="1" name="sbd">
			<option selected>Please Select</option>
			<option>01000</option>
			<option>0110</option>
			<option>01200</option>
			<option>01300</option>
			<option>01400</option>
			<option>01500</option>
			<option>01600</option>
			<option>01700</option>
			<option>01800</option>
			<option>R0000</option>
			<option>R0010</option>
			<option>10000</option>
			<option>11000</option>
			<option>11010</option>
			<option>11020</option>
			<option>12000</option>
			<option>12010</option>
			<option>12020</option>
			<option>13000</option>
			<option>13010</option>
			<option>13020</option>
			<option>14000</option>
			<option>14010</option>
			<option>14020</option>
			<option>14030</option>
			<option>14040</option>
			<option>14050</option>
			<option>20000</option>
			<option>21000</option>
			<option>21010</option>
			<option>21020</option>
			<option>21030</option>
			<option>21110</option>
			<option>22000</option>
			<option>22010</option>
			<option>22020</option>
			<option>22030</option>
			<option>22040</option>
			<option>23000</option>
			<option>23010</option>
			<option>23020</option>
			<option>24000</option>
			<option>24100</option>
			<option>24200</option>
			<option>24300</option>
			<option>25000</option>
			<option>71000</option>
			<option>40000</option>
			<option>50000</option>
			<option>60000</option>
			</select></td>
	</tr>
</table>
<p>&nbsp;</p>


<!--
<%
If (rsLocations.CursorType > 0) Then
  rsLocations.MoveFirst
Else
  rsLocations.Requery
End If
%>
!-->


<table width="551" border="0" cellspacing="0" cellpadding="0" style="margin: 0;">
  <tr>
    <td valign="top" class="loclist">
      <input name="save" type="submit" id="save" value="Save and Continue" onClick="return msg();" /></td>
	  <input name="save" type="submit" id="save" value="Save and Exit" onClick="return msg();" /></td>
    <td width="25"></td>
    <td valign="top" class="loclist">&nbsp;</td>
    <td width="25"></td>
    <td valign="top" class="loclist">&nbsp;</td>
  </tr>
</table>


<input type="hidden" name="MM_insert" value="newemp">
</form>
 
Not really sure that this is going to make a difference.... but here you go.

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="SAPIEN Technologies PrimalScript 3.0">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE></TITLE>



<title>Westar On-Line | Welcome</title>

<div id="toptools">

<a href="/intranet/myaccount/index.asp?user_id=1060" title="Manage your user profile">My Account</a>&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/intranet/admin/index.asp" title="Manage Westar Online">Site Administration</a>&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/intranet/administration/jobposting/index.asp" title="Job Posting Administration">Job Posting Administration</a>&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/intranet/administration/default.asp" title="Document Management">Document Management</a>&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" id="logout" title="Log out from Westar Online"onClick=window.close()>Logout</a>

</div>


<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
@import url("/intranet/css/base.css");
-->
</style>




<!--FORM FIELD VALIDATION-->

<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false}
else {return true}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(first_name,"Name must be filled out!")==false)
  {first_name.focus();return false}
  
if (validate_required(last_name,"Last Name must be filled out!")==false)
  {last_name.focus();return false}
      
if (validate_required(title,"TITLE must be filled out!")==false)
  {title.focus();return false}
     
if (validate_required(effective_date,"EFFECTIVE DATE must be filled out!")==false)
  {effective_date.focus();return false}
      
if (validate_required(contract,"CONTRACT must be filled out!")==false)
  {contract.focus();return false}

}
}

function msg() {
   if (document.PAN1.reports_to[0].selected == true) {
      alert("Please select a SUPERVISOR!");
	  return false
      
}
}

function validate_form(thisform)
{
with (thisform)
{
var validformat=/^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity
var returnval=false
if (!validformat.test(effective_date.value))
alert("Invalid Date Format. Please correct and submit again.")
else{ //Detailed check for valid date ranges
var monthfield=effective_date.value.split("/")[0]
var dayfield=effective_date.value.split("/")[1]
var yearfield=effective_date.value.split("/")[2]
var dayobj = new Date(yearfield, monthfield-1, dayfield)
if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield))
alert("Invalid Day, Month, or Year range detected. Please correct and submit again.")
else
returnval=true
}
if (returnval==false) effective_date.select()
return returnval
}
}

</script>



<div id="container">
<div id="topbanner">
<a href="/intranet/index.asp" id="homelink"></a>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td><html>
</head>







<body>

</td>
	</tr>
</table>
</div>
<div id="contentbox">

<div id="maincontent">
<div id="printlist">

<form ACTION="/intranet/admin/PAN/newhire_pan1.asp" name="PAN1" id="newhire_pan" language="JavaScript" onsubmit="return msg(), validate_form(this);" method="post">
<p class="wsdivname">New Hire &ndash;  Basic Employee Information:</p>


<table border="0" cellspacing="0" cellpadding="0" width="526">
	<tr>
		<td colspan="5">&nbsp;</td>
	</tr>
	
<!--CHECKBOX VALIDATION-->	
	<script type="text/javascript" language="javascript"> 
var freeItemCount=0 
var maxFreeItems=1

function setItems(item)
{ 
  if(item.checked)
  {freeItemCount=freeItemCount+1}

else
 {freeItemCount=freeItemCount-1} 

if (freeItemCount>maxFreeItems)
  {item.checked=false 
  freeItemCount=freeItemCount-1 
  alert('You may only choose '+maxFreeItems+' option. Please choose the '+maxFreeItems+' option you want us to include with this PAN. ')
 
  } 
} 
</script>
	 
  	<tr>
		<td width="260" valign="top" class="loclist">
		<input name="company" type="checkbox" id="A & DG" value="A & DG" onclick="setItems(this)"> 
      &ndash; <b>A & DG</b></td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td colspan="3" valign="top" class="loclist">
		<input name="company" type="checkbox" id="A & DG (Space & Missile, NCR, or COO SBUs)" value="A & DG (Space & Missile, NCR, or COO SBUs)" onclick="setItems(this)">
	&#8211; <b>A & DG</b> (Space & Missile, NCR, or COO SBUs)</td>
		</tr>
	<tr>
		<td width="260" valign="top" class="loclist">
		<input name="company" type="checkbox" id="AFS" value="AFS" onclick="setItems(this)">
	&#8211; <b>AFS </b> </td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td valign="top" class="loclist"><input name="company" type="checkbox" id="WDT" value="WDT" onclick="setItems(this)">
&ndash; <b>WDT</b></td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td width="109" valign="top" class="loclist">&nbsp;</td>
	</tr>
	<tr>
		<td width="260" valign="top" class="loclist">
		<input name="company" type="checkbox" id="SIMAUTHOR" value="SIMAUTHOR" onclick="setItems(this)">
	&#8211; <b>SIMAUTHOR </b> </td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td valign="top" class="loclist"><input name="company" type="checkbox" id="PIMSOL" value="PIMSOL" onclick="setItems(this)">
	&#8211; <b>PIMSOL</b></td>
		<td width="4" valign="top" class="loclist">&nbsp;</td>
		<td width="109" valign="top" class="loclist">&nbsp;</td>
	</tr>
	
		<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	
		<tr>
		<td width="260" bgcolor="#EEEEEE">&nbsp;</td>
		<td width="4" bgcolor="#EEEEEE">&nbsp;</td>
		<td bgcolor="#EEEEEE">&nbsp;</td>
		<td bgcolor="#EEEEEE" width="4">&nbsp;</td>
		<td bgcolor="#EEEEEE" width="109">&nbsp;</td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	
	<tr>
		<td width="260"><font face="MS Sans Serif"><font size="2">First Name:<br>
		</font><input type="text" name="first_name" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td><font face="MS Sans Serif"><font size="2">Last Name:<br>
		</font><input type="text" name="last_name" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td width="109"><font face="MS Sans Serif"><font size="2">M.I.:<br>
		</font><input type="text" name="middle_initial" size="5"></font></td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	<tr>
		<td width="260"><font face="MS Sans Serif"><font size="2">Title:<br>
		</font><input type="text" name="title" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td colspan="3"><font face="MS Sans Serif" size="2">Effective Date: 
		</font><font face="MS Sans Serif" size="1">(MM/DD/YYYY)</font><font face="MS Sans Serif" size="2"><br>
		</font><font face="MS Sans Serif">
		<input type="text" name="effective_date" size="24"></font></td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td colspan="3"><font size="1" face="MS Sans Serif">(1st or 16th of 
		month if salary adj./promo.)</font></td>
	</tr>
      </select>
  </tr>
  </Table>
  
  
        
<Table>    

	<tr>
		
	<!--Supervisor Dropdown-->	
		<td valign="top" class="loclist" style="width: 260px;">Supervisor / Manager :<br />
        <select name="reports_to" id="reports_to" style="width: 260px;" size="1">
        <option selected>Please Select</option>
          
          <option value="1924">Agarwal Deb</option>
          
          <option value="1926">Akamatsu Mary</option>
          
          <option value="1932">Alford Elisha</option>
          
          <option value="1972">Allen Bill</option>
          
          <option value="1940">Ammons Keith</option>
          
          <option value="1941">Anderson Tamera</option>
          
          <option value="1950">Arbuckle Jimmy</option>
          
          <option value="1954">Armstrong George</option>
          
          <option value="1968">Badger Dennis</option>
          
          <option value="2078">Baker Chuck</option>
          
          <option value="1982">Bass Bob</option>
          
          <option value="1994">Bellot Allen</option>
          
          <option value="1997">Bennett James</option>
          
          <option value="1999">Berghoff Dave</option>
          
          <option value="2001">Best Gina</option>
          
          <option value="2005">Bissell Rod</option>
          
          <option value="2015">Blume Brad</option>
          
          <option value="2018">Bockes Terry</option>
          
          <option value="2019">Boeck Robert</option>
          
          <option value="2031">Braddy William</option>
          
          <option value="2050">Buell David</option>
          
          <option value="2053">Burns Greg</option>
          
          <option value="2061">Cadden Paul</option>
          
          <option value="2064">Callan Andrew</option>
          
          <option value="2068">Cannon Ronald</option>
          
          <option value="2232">Carlson Michael</option>
          
          <option value="2084">Chandler Vanessa</option>
          
          <option value="2092">Childress Doug</option>
          
          <option value="2096">Chute Dave</option>
          
          <option value="1601">Collins Lynn</option>
          
          <option value="1350">Colvert Phillip</option>
          
          <option value="2111">Cordum Terry</option>
          
          <option value="2115">Cox Allen</option>
          
          <option value="2116">Crabtree Patricia</option>
          
          <option value="2123">Crowe Dennis</option>
          
          <option value="2130">Cunefare Dave</option>
          
          <option value="2132">Curtis Shane</option>
          
          <option value="2133">Dandridge Larry</option>
          
          <option value="2135">Darbro Stan</option>
          
          <option value="1821">Dean Gary</option>
          
          <option value="1706">Denton Harold</option>
          
          <option value="1710">Dickey James</option>
          
          <option value="1715">Distasio Joseph</option>
          
          <option value="2370">Dodds Amy</option>
          
          <option value="1728">Downen Phil</option>
          
          <option value="1744">Durham William</option>
          
          <option value="1751">Eckberg Tim</option>
          
          <option value="1753">Edwards Kenneth</option>
          
          <option value="1786">Fleming Paul</option>
          
          <option value="1792">Foster Jay</option>
          
          <option value="1794">Foxworth Shirley</option>
          
          <option value="2322">Franks Eldon (Pete)</option>
          
          <option value="1801">Frezell Tom</option>
          
          <option value="1804">Frye Felix</option>
          
          <option value="1805">Fuehrer Paul</option>
          
          <option value="1813">Garceau Paul</option>
          
          <option value="1833">Gladney Shantaye</option>
          
          <option value="1838">Gonzalez Angel</option>
          
          <option value="1839">Gordian Pablo</option>
          
          <option value="1126">Gordon Terry</option>
          
          <option value="1847">Griffin Yvonne</option>
          
          <option value="1852">Groene Steve</option>
          
          <option value="1853">Gross Michael</option>
          
          <option value="1860">Guyant Glenn</option>
          
          <option value="1867">Hall Scott</option>
          
          <option value="1878">Hart Doug</option>
          
          <option value="2136">Heiligenstein Dave</option>
          
          <option value="1888">Heine Kurt</option>
          
          <option value="1756">Henderson Edwin</option>
          
          <option value="1891">Hendrickson James</option>
          
          <option value="1894">Herrell Jeff</option>
          
          <option value="1516">Hicks Jim</option>
          
          <option value="1902">Hodges Gregory</option>
          
          <option value="1905">Hojnicki Leon</option>
          
          <option value="1906">Holbert Lloyd</option>
          
          <option value="2395">Hollander David</option>
          
          <option value="1907">Holmer Roger</option>
          
          <option value="1908">Holmes Irene</option>
          
          <option value="1477">Huguenin Nina</option>
          
          <option value="1478">Huizenga Jaime</option>
          
          <option value="2545">Hurley Bryan</option>
          
          <option value="1483">Hutson Dean</option>
          
          <option value="1485">Hynes Tim</option>
          
          <option value="1487">Ikard Jeffery</option>
          
          <option value="1489">Irby John</option>
          
          <option value="1359">Jackson Perry</option>
          
          <option value="1532">Joyner Clint</option>
          
          <option value="1544">Junkin Karen</option>
          
          <option value="1565">Kilian John</option>
          
          <option value="1567">King Timothy</option>
          
          <option value="1574">Kodadek Bill</option>
          
          <option value="1576">Kovacs Julius</option>
          
          <option value="1577">Kozlowski Joseph</option>
          
          <option value="1589">Lamb Don</option>
          
          <option value="1591">Lampa James</option>
          
          <option value="1720">Lewis David</option>
          
          <option value="1607">Lewis John</option>
          
          <option value="1138">Lewis Teri</option>
          
          <option value="1613">Liddon Michelle</option>
          
          <option value="1615">Lindeman Lorna</option>
          
          <option value="1646">Marler Michael</option>
          
          <option value="1648">Marsh Jim</option>
          
          <option value="1650">Martz Garrett</option>
          
          <option value="1665">Mccann Barb</option>
          
          <option value="1693">Meek Fred</option>
          
          <option value="1694">Meissner Linda</option>
          
          <option value="1696">Melton Susan</option>
          
          <option value="1261">Milar Greg</option>
          
          <option value="1621">Miller Larry</option>
          
          <option value="2414">Mullins Diane</option>
          
          <option value="1280">Murdock Camellia</option>
          
          <option value="2546">Newby Bill</option>
          
          <option value="1292">Newman Tom</option>
          
          <option value="1851">Newport Gary</option>
          
          <option value="2367">O'Donnell Robert</option>
          
          <option value="2303">O'Reilly Michael</option>
          
          <option value="1307">OConnor Karen</option>
          
          <option value="1308">Odom Steven</option>
          
          <option value="1313">Ormond Garland</option>
          
          <option value="1334">Payment Timothy</option>
          
          <option value="1945">Peterson Al</option>
          
          <option value="1729">Peterson Debra</option>
          
          <option value="2134">Peterson Dennis</option>
          
          <option value="1344">Peterson Steven</option>
          
          <option value="1345">Petry Dave</option>
          
          <option value="1232">Pettigrew Haywood</option>
          
          <option value="1578">Phillips Kendell</option>
          
          <option value="1358">Pittman Jammie</option>
          
          <option value="1579">Porter Kurt</option>
          
          <option value="1947">Pruett Allen</option>
          
          <option value="1378">Pullum Hal</option>
          
          <option value="1380">Putnam Jeffrey</option>
          
          <option value="1385">Radcliffe Harry</option>
          
          <option value="1387">Rains Hanson</option>
          
          <option value="1389">Ramsey Mathew</option>
          
          <option value="1529">Ramsey Rebecca</option>
          
          <option value="2674">Raymond Robert</option>
          
          <option value="1395">Redick Roger</option>
          
          <option value="1396">Reed Mike</option>
          
          <option value="1398">Reeves John</option>
          
          <option value="1402">Reynolds Diane</option>
          
          <option value="1406">Rhoades Ronald</option>
          
          <option value="1410">Riley Walt</option>
          
          <option value="1412">Ringsaker Jim</option>
          
          <option value="1420">Robinson Michael</option>
          
          <option value="1236">Rodriguez William</option>
          
          <option value="1435">Rowlson Tony</option>
          
          <option value="2231">Ruggeri Michael</option>
          
          <option value="1450">Sakole Mike</option>
          
          <option value="1458">Scheuer Henry</option>
          
          <option value="1459">Schieffer William</option>
          
          <option value="1465">Scimone Mike</option>
          
          <option value="1469">Scott Jodi</option>
          
          <option value="2126">Shannon Criag</option>
          
          <option value="1472">Shannon Kenneth</option>
          
          <option value="1067">Skvorz Sandra</option>
          
          <option value="1506">Smith Jeffrey</option>
          
          <option value="1088">Smith Steve</option>
          
          <option value="1085">Squires Maurice</option>
          
          <option value="1090">Steckel Timothy</option>
          
          <option value="1091">Steele Ron</option>
          
          <option value="1441">Stenberg Robert</option>
          
          <option value="1098">Stokes Jeffrey</option>
          
          <option value="1100">Storm Garien</option>
          
          <option value="1106">Suits David</option>
          
          <option value="1107">Sullivan Randy</option>
          
          <option value="1118">Tanascu Michael</option>
          
          <option value="1124">Terry David</option>
          
          <option value="1127">Thill David</option>
          
          <option value="1128">Thomas Larry</option>
          
          <option value="1538">Thompson Jimmy</option>
          
          <option value="1132">Tieszen Randy</option>
          
          <option value="1133">Timmerman Tim</option>
          
          <option value="1904">Timmons Barbara</option>
          
          <option value="1140">Tomaine Bob</option>
          
          <option value="1144">Topping Rob</option>
          
          <option value="1146">Townsend Angela</option>
          
          <option value="1540">Traylor John</option>
          
          <option value="1147">Traylor Mike</option>
          
          <option value="2335">Tucker Stephen</option>
          
          <option value="1157">Turner Andria</option>
          
          <option value="1162">Vanderweyden Mark</option>
          
          <option value="1163">Vanhooser Karen</option>
          
          <option value="1168">Vennard Jim</option>
          
          <option value="1171">Vickery Michael</option>
          
          <option value="1176">Wahlheim Bill</option>
          
          <option value="1177">Wakefield Keri</option>
          
          <option value="1178">Wales David</option>
          
          <option value="1110">Walters Steve</option>
          
          <option value="1746">Ward Dane</option>
          
          <option value="1194">Weller David</option>
          
          <option value="1204">Wheeler Eric</option>
          
          <option value="1215">Willard Cherylann</option>
          
          <option value="1772">Williams Eugene</option>
          
          <option value="1113">Williams Steve</option>
          
          <option value="1217">Williford Jim</option>
          
          <option value="1220">Wilson Mike</option>
          
          <option value="1230">Wood Carl</option>
          
          <option value="1158">Wright Harold (Tim)</option>
          
          <option value="1245">Ziehlke Austin</option>
          
          <option value="1248">Zink April</option>
          
          <option value="2645">Zonfrelli Michael</option>
          
</select></td>
<!--End Supervisor Dropdown-->
		
		<td width="4">&nbsp;</td>
		<td><font face="MS Sans Serif" size="2">Contract:<br>
		</font><font face="MS Sans Serif">
		<input type="text" name="contract" size="20"></font></td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	<tr>
		<td width="260">&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td>&nbsp;</td>
		<td width="4">&nbsp;</td>
		<td width="109">&nbsp;</td>
	</tr>
	<tr>
		<td><font face="MS Sans Serif" size="2">Location:<br>
		</font><select name="location" id="location" style="width: 260px;" size="1">
		<option selected>Please Select</option>
        
        <option value="17">Afghanistan</option>
        
        <option value="1">AFS</option>
        
        <option value="18">Alexandria</option>
        
        <option value="19">Anniston</option>
        
        <option value="8">APG - 392 Hopkins Rd.</option>
        
        <option value="61">APG - 4120 Susquehanna Ave.</option>
        
        <option value="3">Arlington (NCR)</option>
        
        <option value="20">Biggs AAF</option>
        
        <option value="58">Brunswick, ME</option>
        
        <option value="54">Canyon Lake</option>
        
        <option value="21">Charleston</option>
        
        <option value="9">Clarksville</option>
        
        <option value="46">Colorado Springs</option>
        
        <option value="22">Corpus Christi</option>
        
        <option value="5">Daleville</option>
        
        <option value="14">Dugway</option>
        
        <option value="51">Dulles</option>
        
        <option value="25">Ft. Benning</option>
        
        <option value="52">Ft. Bliss</option>
        
        <option value="26">Ft. Bragg</option>
        
        <option value="6">Ft. Campbell</option>
        
        <option value="27">Ft. Carson</option>
        
        <option value="28">Ft. Drum</option>
        
        <option value="29">Ft. Hood</option>
        
        <option value="30">Ft. Hood WCTSF</option>
        
        <option value="31">Ft. Irwin</option>
        
        <option value="32">Ft. Knox</option>
        
        <option value="33">Ft. Leonard Wood</option>
        
        <option value="34">Ft. Lewis</option>
        
        <option value="35">Ft. Polk</option>
        
        <option value="36">Ft. Riley</option>
        
        <option value="55">Ft. Rucker - U.S. Army Combat Readiness Center</option>
        
        <option value="15">Ft. Rucker - US Army Aviation Technical Center</option>
        
        <option value="37">Ft. Stewart</option>
        
        <option value="38">Germany</option>
        
        <option value="59">Germany Location 42</option>
        
        <option value="39">Hunter AAF</option>
        
        <option value="13">Huntsville (CBM)</option>
        
        <option value="12">Huntsville 4950 Corporate Drive</option>
        
        <option value="10">Huntsville 890 Explorer Blvd.</option>
        
        <option value="40">Iraq</option>
        
        <option value="41">Korea</option>
        
        <option value="42">Kosovo</option>
        
        <option value="43">Kuwait</option>
        
        <option value="7">Manassas</option>
        
        <option value="53">PIMSOL</option>
        
        <option value="57">Redstone Arsenal</option>
        
        <option value="60">Saudi Arabia</option>
        
        <option value="44">Schofield Barracks</option>
        
        <option value="50">SimAuthor - Boulder, CO</option>
        
        <option value="2">St. Charles</option>
        
        <option value="49">Stafford</option>
        
        <option value="56">Washington DC (Navy Yard)</option>
        
        <option value="45">West Palm Beach</option>
        
            </select></td>
		<td>&nbsp;</td>
		<td colspan="3"><font face="MS Sans Serif" size="2">SBD:</font><br>
		<select size="1" name="sbd">
			<option selected>Please Select</option>
			<option>01000</option>
			<option>0110</option>
			<option>01200</option>
			<option>01300</option>
			<option>01400</option>
			<option>01500</option>
			<option>01600</option>
			<option>01700</option>
			<option>01800</option>
			<option>R0000</option>
			<option>R0010</option>
			<option>10000</option>
			<option>11000</option>
			<option>11010</option>
			<option>11020</option>
			<option>12000</option>
			<option>12010</option>
			<option>12020</option>
			<option>13000</option>
			<option>13010</option>
			<option>13020</option>
			<option>14000</option>
			<option>14010</option>
			<option>14020</option>
			<option>14030</option>
			<option>14040</option>
			<option>14050</option>
			<option>20000</option>
			<option>21000</option>
			<option>21010</option>
			<option>21020</option>
			<option>21030</option>
			<option>21110</option>
			<option>22000</option>
			<option>22010</option>
			<option>22020</option>
			<option>22030</option>
			<option>22040</option>
			<option>23000</option>
			<option>23010</option>
			<option>23020</option>
			<option>24000</option>
			<option>24100</option>
			<option>24200</option>
			<option>24300</option>
			<option>25000</option>
			<option>71000</option>
			<option>40000</option>
			<option>50000</option>
			<option>60000</option>
			</select></td>
	</tr>
</table>
<p>&nbsp;</p>


<!--

!-->


<table width="551" border="0" cellspacing="0" cellpadding="0" style="margin: 0;">
  <tr>
    <td valign="top" class="loclist">
      <input name="save" type="submit" id="save" value="Save and Continue" /></td>
	  <input name="save" type="submit" id="save" value="Save and Exit" /></td>
    <td width="25"></td>
    <td valign="top" class="loclist">&nbsp;</td>
    <td width="25"></td>
    <td valign="top" class="loclist">&nbsp;</td>
  </tr>
</table>


<input type="hidden" name="MM_insert" value="newemp">
</form>
</div>
</div>

<div id="subnavarea">
  <div id="mainsubnav">
    <ul>
      <li><a href="../index.asp" title="Site Administration Home" class="active">Site
          Administration Home</a></li>
    </ul>
  </div>
</div>
</div>
<div id="footer">
&copy;2004-2006 Westar Aerospace &amp; Defense Group, Inc. All rights reserved.
</div>
</div></div>
</div>
</div>
</body>
</html>
 
1) you still have an invalid onsubmit event in your form tag.
2) you still have onclick calls in your submit buttons - remove them.
3) you have TWO validate_form functions!

fix these, then post your results.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
What should I call the other validate_form function? When I removed the Onclick call in my submit buttons the page would still go to the next page, even when the alert box popped up.
 
Sorry I don't know javascript well... I only copy and paste it and try to modify it so it works for me. I don't know that the protocol is for naming functions and then calling them in your form. I thought there were probably reserved words that you have to use that I don't know.

I appologize for not been more independant.
 
the problem (one of them, at least) is that the two functions are named the same. do you need both of them? if not, choose which one you need, or combine them into one function.

your onsubmit will fire when the form is submitted, which is why you don't need to onclick calls in your submit buttons.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top