- Moderator
- #1
Here's the situation.
I have form web page that is dynamically built from ASP. In other words, the record number is included with the name of the form field, so I could have frm23depart and frm27depart, for example.
I want to do some validation on those fields, but what I need is something like:
function compare(fieldno){
var1=document.form1.frm<fieldno>depart.value;
....
See the issue? I need the javascript to be dynamically passed which FIELD it needs to use for it's calculations
I'm using onchange="compare(<%=fieldno%>)" ... to pass the field number to the javascript.
Any thoughts on this? It's holding up a project that I'm working on.....
I don't really want to dynamically generate multiple functions just for this (although that would be an option).
--Greg
Just my $0.02
"In order to start solving a problem, one must first identify its owner." --Me
--Greg
I have form web page that is dynamically built from ASP. In other words, the record number is included with the name of the form field, so I could have frm23depart and frm27depart, for example.
I want to do some validation on those fields, but what I need is something like:
function compare(fieldno){
var1=document.form1.frm<fieldno>depart.value;
....
See the issue? I need the javascript to be dynamically passed which FIELD it needs to use for it's calculations
I'm using onchange="compare(<%=fieldno%>)" ... to pass the field number to the javascript.
Any thoughts on this? It's holding up a project that I'm working on.....
I don't really want to dynamically generate multiple functions just for this (although that would be an option).
--Greg
Just my $0.02
"In order to start solving a problem, one must first identify its owner." --Me
--Greg