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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    144
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Angry Tables and Forms

    Hi Guys,

    Is it possible to populate a field in a form from a cell in a table when a window is closed?

    The Dingbat

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In theory this should work but no idea how u will test it
    as the window closes lol.

    Code:
     
    <head>
    <script language="JavaScript">
    function populate()
    {
    document.Form1.Field.value=document.all.cell.innerHTML;
    }
    </script>
    </head>
    <body onUnLoad="popultate();">
    <form name=Form1>
    <input type="text" name=Field value="">
    </form>
    <table>
    <tr>
    <td id=cell>
    Test
    </td>
    </tr>
    </table>
    </body>


  •  

    Posting Permissions

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