<!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.2712.300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Hi
Folks:<BR><BR>I have a little problem that I hope someone can sort out with a
quick glance. I am trying to create a function that will do the
following:<BR><BR>* take as input two parameters<BR>* use one of those
parameters to identify which form field it should read the value of<BR>* output
a url with three parameters, those being the first two plus the value from the
form field<BR><BR>I get an error when trying to dynamically access the value of
the form field. Do I need to use eval() or something? What does that do
anyway?<BR><BR>Here's some code that illustrates what I've got. Give it a
try:<BR><BR><script language=javascript><BR><!--<BR><BR>function
selector(myCat,myField) {<BR>var st =
document.forms[0].myField.value;<BR>document.write ('sel.asp?c=' + myCat+
'&f=' + myField + '&st=' +
st)<BR>}<BR><BR>//--><BR></script><BR><BR><form><BR><input
type="text" name="emp"><BR><input type=button value="..."
onClick="selector('intl','emp')"><BR></form><BR><BR>But instead of
giving me a window with the following (and which does come when hard coding 'var
st' with
'document.forms[0].emp.value'):<BR><BR>sel.asp?c=intl&f=emp&st=user_input<BR><BR>I
am stuck with this:<BR><BR>Error: 'document.forms.0.myField.value' is null or
not an object.<BR><BR>Any help would be great.
Thanks.<BR><BR>Bill</FONT><BR><BR><BR></FONT></DIV></BODY></HTML>