Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Is this possible?

    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!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    window.opener.document.Form1[FieldName].value = result;

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

  • #3
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    THANKS ADIOS! It worked perfectly!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •