How to access forms in Mozilla ?

Giganews Newsgroups
Subject: How to access forms in Mozilla ?
Posted by:  Bart (broersma.juda_ANTISPA…
Date: Fri, 26 Dec 2003

Hi there,

I've got a strange problem.
Used to use IE.
Now switched to Mozilla (1.4).

This works fine in IE but produces nothing (not even an errormessage)
in Mozilla:

<script language="JavaScript">
function calc()
  var i;
  var j;
  i = calcform.T1.value;
  j = 2*i;
  calcform.T2.value = j;
<form name="calcform">
  <input type='text' id="T1" value='2'>
  <input type="button" id="B1" value="multiply by 2" onClick="calc()">
  <input type='text' value='' id=T2>

Mozilla seems to be unable to access the value of the first (or any)
input type of the form.

Is this a feature of Mozilla, or am I making a mistake somewhere?

Please help !!


Bart Broersma
(ff _ANTISPAM_ wegpoetsen uit dit adres natuurlijk)