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
    Aug 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Why is this returning null!?!?

    document.formreel.ftppath.value = "STUFF";

    This line says document.formreel.ftppath.value is null. Why is this???

    Please help
    Carmen

    below is the code portion with the form and javascript how they appear.




    <tr bgcolor="#CCCCCC">
    <td>
    <form name="formreel" method="get" action="DBreels.php">

    <input type="hidden" name="editorID" value="64">
    <input type="hidden" name="reeltype" value="Reel ">
    <input type="text" name="agency" size="15"/>
    </td>
    <td>
    <input type="text" name="product" size="15"/>
    </td>
    <td>
    <input type="text" name="director" size="15"/>
    </td>
    <td>
    <input type="text" name="title" size="15"/>
    </td>
    <td>
    <input type="text" name="duration" size="5"/>
    </td>
    <td>
    <table>
    <tr>
    <td>
    <span class='style1'>
    <a href="ftp.php?id=64&type=Reel+ &formID=formreel"> PICK</a>
    </span>
    </td>
    <td>
    <input type="text" name="ftppath" size="35">
    </td>
    <td>
    <span class='style1'>
    <a href=''>PREVIEW</a>
    </span>
    </td>
    </tr>
    </table>

    </td>
    <td>
    <input type="text" name="comment" >
    </td>
    <td>
    <input type="text" name="rank" size="5"/>
    </td>
    <td>
    </td>
    <td>
    <input name="save" value="add" type="submit" >
    </td>
    </tr>
    </form>
    </table>

    <script language="Javascript">

    alert('1');
    function change(){
    document.formreel.ftppath.value = "STUFF";
    }
    alert("here");
    change();
    </script>



    </body>
    </html>

  • #2
    New Coder
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <td>
    <input type="text" name="ftppath" size="35">
    </td>
    Value of ftppath is none, then change() put "STUFF" into that inputbox. What the problem is?

  • #3
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    window.onload = change;

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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