...

View Full Version : Is this possible?



oreo
06-27-2002, 10:33 PM
Is it possible to pass a paramter that will specify the field name on a form? If this is possible what is the correct syntax for writing the function. I can't seem to get it to work.

javascript: populate('hello','TextBox1')


<SCRIPT LANGUAGE = "JavaScript">
<!--
function populate(result,FieldName) {
if (window.opener && !window.opener.closed)
window.opener.document.Form1.FieldName.value = result;
window.close();// -->
}
</SCRIPT>

Thanks!

adios
06-27-2002, 10:35 PM
window.opener.document.Form1[FieldName].value = result;

http://www.xs4all.nl/~ppk/js/associative.html

oreo
06-27-2002, 10:39 PM
THANKS ADIOS! It worked perfectly!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum