M
Michael Winter
On 17/04/2005 23:26, Warren Thai wrote:
[snip]
If course not. There is no element with the id, 'id'. Remove the
quotes so that the sequence is evaluated as an identifier and a
property accessor, not a string literal.
[snip]
The language attribute is deprecated. Use the (required) type
attribute instead:
<script type="text/javascript">
You also seem to have omitted the required TITLE element.
It tends to be better to use array literals, rather than Array
constructors:
var ans = ['0', '0'];
[snip]
Out of interest, why are you writing into A elements? Wouldn't P or
SPAN elements be more appropriate? Secondly, square brackets are not
allowed as part of id attribute values. If you really want a
separator, you could use a hyphen (-), underscore (_), colon ), or
dot (.).
[snip]
Mike
[snip]
[T]he line ----
document.getElementById('id').firstChild.data = 'CORRECT';
---- doesn't work with the ('id') part.
If course not. There is no element with the id, 'id'. Remove the
quotes so that the sequence is evaluated as an identifier and a
property accessor, not a string literal.
[snip]
<HEAD>
<SCRIPT language = 'Javascript'>
The language attribute is deprecated. Use the (required) type
attribute instead:
<script type="text/javascript">
You also seem to have omitted the required TITLE element.
var ans = new Array('0','0');
It tends to be better to use array literals, rather than Array
constructors:
var ans = ['0', '0'];
[snip]
<a id=id[0]> </a>
Out of interest, why are you writing into A elements? Wouldn't P or
SPAN elements be more appropriate? Secondly, square brackets are not
allowed as part of id attribute values. If you really want a
separator, you could use a hyphen (-), underscore (_), colon ), or
dot (.).
[snip]
Mike