<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have defined some submit buttons, e.g., assoc/w 
"Inquire", "Update", etc., &nbsp;as follows:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV>$cgi-&gt; submit(-name=&gt;"action", -value=&gt;"Inquire"),</DIV>
  <DIV>$cgi-&gt; submit(-name=&gt;"action", 
-value=&gt;"Update"),<BR></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial size=2>Regarding the first "if" condition in the following 
JavaScript code (from the <FONT face="Times New Roman" size=3>checkForm</FONT> 
function executed <FONT face="Times New Roman" size=3>-onsubmit</FONT>), the 
value of&nbsp; " <FONT face="Times New Roman" size=3>form["action"].value</FONT> 
" is <EM>undefined</EM> (. . .at least at the point in my code); however, the 
value of&nbsp;" <FONT face="Times New Roman" size=3>form[''name"].value</FONT> " 
is the value as typed in the form's <EM>Name</EM> field.&nbsp; </FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if ( form["action"].value == "Update") 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if ( form["name"].value == "") 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  alert("Name is 
  required");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  return 
  false;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }<BR></DIV></BLOCKQUOTE>
<DIV dir=ltr><FONT face=Arial size=2>Obviously, the following <FONT 
face="Times New Roman" size=3>-onsubmit</FONT> condition is executing the 
JavaScript.&nbsp; In the client-side JavaScript, how do I test the value of the 
clicked submit button?&nbsp; In other words, I need to know which submit button 
was clicked.</FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial 
  size=2></FONT><BR>$cgi-&gt;start_form(-action=&gt;'vendors_01.pl',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -method=&gt;'GET',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -name=&gt;'vendors_01.pl',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -onsubmit=&gt;"return checkForm( this );" );</DIV></BLOCKQUOTE>
<DIV><FONT face=Arial size=2>Thanks,<BR>Ron Wingfield</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=1>FreeBSD 4.8&nbsp; --&nbsp; Apache http 2.0.28 -- 
MySQL client/server 4.1.7<BR>Perl 5.8.5 -- p5-DBD-mysql-2.9004 driver -- 
p5-DBI-1.46</FONT></DIV></BODY></HTML>