bobo
February 16th, 2006, 05:11 PM
I cant believe I cant get this going... I simply want to impliment a value into a text field using javascript. whats wrong with this. The error I get says "document.con.comments" is null or does not exist. :blush:
(I simplified dramaticaly here for time purposes)
<html>
<head>
<title>Untitled</title>
<script language="javascript">
var fieldtext = "hello world";
document.con.comments.value = fieldtext;
</script>
</head>
<body>
<form action="" name="con" id="con">
<input type="text" name="comments">
</form>
</body>
</html>
(I simplified dramaticaly here for time purposes)
<html>
<head>
<title>Untitled</title>
<script language="javascript">
var fieldtext = "hello world";
document.con.comments.value = fieldtext;
</script>
</head>
<body>
<form action="" name="con" id="con">
<input type="text" name="comments">
</form>
</body>
</html>