...

View Full Version : Why is this returning null!?!?



cbranje
08-31-2006, 06:33 PM
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>

Wylie
08-31-2006, 06:53 PM
<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?

A1ien51
08-31-2006, 07:41 PM
window.onload = change;

Eric



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum