Hi,
I have a anchor whose target is set to value "myWin" . When the user clicks, the anchor element's href is set. The page comes up well as specified in the target.

The actual situation is that there are many links. All links point to the same target. When the user clicks, the page comes up fine, but it remains at the back of the original page. How to get it the front?

Here is the code which simulates the problem. The problem can be seen clearly in fire fox.

Code:
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<script>
  var i = 0;
  var link= new Array("http://www.yahoo.com", "http://www.google.com", "http://www.webmonkey.com");
  function  testTargetOnAnchor(linkId)
  {
     var elm = document.getElementById(linkId);
     if (i > 2)
     {
       i = 0;
     }
     alert(link[i]);
     elm.href= link[i];
     i++;     
  }
</script>
</head>

<body>
   <form>
     <ul>
       <li onclick="testTargetOnAnchor('linkId');"><a id="linkId" href=""     target="myWin">Window Example</a>
       </li>
     </ul>
   </form>
</body>
</html>
Click on the link first time and wait for new page to be loaded.
After this again click, on the link, the already opened page is refreshed with the current url, but it remain in the back.

It is possible to get handle to this window object and set focus to it?

Here the window is "myWin" - it is specified as the target of the anchor tag.

Code:
 <a id="linkId" href=""  target="myWin">Window Example</a>

Any pointers would be really appreciated.

Thanks,
Vijay