|
|
N
O
T
E |
The HTML <form> tags must be in place in order for Navigator to read button elements. MSIE
accepts soft references to form elements, Navigator
won't. In the example below, MSIE recognizes the call to it from form jo, and treats
the function as though it were preceded by a with
statement. The Navigator syntax works with both browsers. |
|
MSIE soft reference allowed
|
Navigator hard reference required
|
<script
language="JavaScript">
<!-- |
<script
language="JavaScript">
<!-- |
|
|
function show(form) {
jo.jojo.value = "So consider using hard references" }
// soft reference by form
name only
// -->
</script>
|
function show(form) {
document.jo.jojo.value = "So consider using hard references" }
// hard reference includes
full hierarchy
// -->
</script>
|
|
|
<form
name="jo"><textarea rows="3" name="jojo"
cols="20" onFocus="show(this.form)"> Beware!Browsers read thing's
differently.</textarea>
|
<form
name="jo"><textarea rows="3" name="jojo"
cols="20" onFocus="show(this.form)"> Beware!Browsers read thing's
differently.</textarea>
|