Image

Imagelbaruch wrote in Imagejavascript

Newcomer question

Help...

What, heck, can be wrong in

<HTML>



<HEAD>

<script TYPE="text/javascript">

function my()

{

    alert("called from hypertext");

    document.all["11"].href="http://cnn.com";

}

</script>

</HEAD>

<BODY>

<a name="11" href="">11</a>

<a HREF="javascript:my()" name="12">12</a>

</BODY>


</HTML>





While clickng on "12" link, function my() is called but HREF of "11" anchor is not changing. What can be wrong ? :(


Update: enough to replace "11" name by something like "a11"....