Sent this once already but have not gotten any replies, can anyone help?
A little help please. I am trying to use some javascript on my CF pages. I
would like to pass the formname and fieldname to the function, perform an
action and return the value: i.e.
<SCRIPT LANGUAGE = "JavaScript">
<!--
function changevalue(FormName, FieldName)
{
var oldvalue;
var newvalue;
oldvalue = document.FormName.FieldName.value;
TAKE ACTION HERE
document.FormName.FieldName.value = newvalue;
}
//-->
</SCRIPT>
The formname and Fieldnames are being passed fine, but how do I use them.
now oldvalue is being set EQ to "document.FormName.FieldName.value" not the
value of the field , how can I get the value from the form field.
If I call the formfield in the function by hardcoding its name I get the
function to work fine, but I would like to re-use this without having to
change the function each time.
Thanks for your help
Rodney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists