Web Analytics Made Easy -
StatCounter Is this possible? - CodingForum

Announcement

Collapse
No announcement yet.

Is this possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    window.opener.document.Form1[FieldName].value = result;

    Comment


    • #3
      THANKS ADIOS! It worked perfectly!!!

      Comment

      Working...
      X