Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forms[0].changes.value is null or not an object

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im quite new to javascript and im getting the following error document.forms[0].changes.value is null or not an object. What am i doing wrong? Thanks for your time

<script language="JavaScript">
function writeIt()
{
alert(document.forms[0].changes.value);
}
</script>
</head>
<body>
<CENTER>
<table width="750" border="1" cellspacing="3" cellpadding="3">
<tr>
<th>Item Type</th>
</tr>

<tr>
<td class="regtext" valign="top">
<tr>
<td>
<SELECT name='itemType' onchange="writeIt();">

<OPTION value="A" selected>A</OPTION>
<OPTION value="N">N</OPTION>
<OPTION value="P">P</OPTION>
<OPTION value="T">T</OPTION>
</SELECT>
</td>
<td>
<input type="text" name="price" value="90" onchange="writeIt();" size="20">
</td>
<input name="id" type="hidden" value="AJ-LA-4005">
<input name="changes" type="hidden">
</tr>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no form on your page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic