actually, i don't think there's anything wrong with the submit function.
it's the action that's a problem. it doesn't need to be there, because it
should be in the opening tag of the form that the javascript is referring
to. all you need to do is reference the form properly, which i'm pretty sure
you were. i usally use the javascript arrays to get to things, e.g.
document.forms[0].submit();, but names are fine as long as you declare that
name in the opening form tag. 

e.g. (again): 
<form action="index.cfm" method="post" name="Employeeform">
  <SELECT NAME="PayType" ONCHANGE="document.Employeeform.submit()">
  <option value="jon">jon</option> 
  <option value="jen">jen</option>
  </select>
</form>

jb.

-----Original Message-----
From: Stanislav Maximov [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 04, 2000 9:58 AM
To: [EMAIL PROTECTED]
Subject: RE: Onchange submit


Try document.forms.Employeeform.submit()

Stas.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 04, 2000 3:19 PM
> To: [EMAIL PROTECTED]
> Subject: OT: Onchange submit
> 
> 
> I want a form to be submitted when the user makes a change in 
> a select box. The form name 
> is "Employeeform". This doesn't work:
> 
> <SELECT NAME="PayType" 
> ONCHANGE="document.Employeeform.action='index.cfm';
> document.Employeeform.submit()">
> 
> Why?
> 
> Gene Kraybill
> --------------------------------------------------------------
> ----------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
s/cf_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to