I have a page that I want to open 5 different pages one at a time, after it opens the page I want it to pop up an alert displaying the the second link from the links[] array from that page.
Here is the code:
I tried:
setTimeout("alert(window1.links[1])",5000*(i+.8));
and
setTimeout("alert(WindowObjectReference.links[1])",5000*(i+.8));
but neither worked.
----------------------------
Beau71 - MCSA
----------------------------
Here is the code:
Code:
<script type="text/javascript">
function openSites() {
var openOneAtATime=new Array()
openOneAtATime[0]="[URL unfurl="true"]http://www.ebay.com"[/URL]
openOneAtATime[1]="[URL unfurl="true"]http://www.google.com"[/URL]
openOneAtATime[2]="[URL unfurl="true"]http://www.cnn.com"[/URL]
openOneAtATime[3]="[URL unfurl="true"]http://www.yahoo.com"[/URL]
openOneAtATime[4]="[URL unfurl="true"]http://www.amazon.com"[/URL]
var i=0;
for (i=0;i<openOneAtATime.length;i++) {
setTimeout("WindowObjectReference = window.open(openOneAtATime[i],"window1")",5000);
setTimeout("alert(window1.links[1])",5000*(i+.8));
setTimeout("WindowObjectReference.close()",5000*(i+1.2))
}
}
</script>
I tried:
setTimeout("alert(window1.links[1])",5000*(i+.8));
and
setTimeout("alert(WindowObjectReference.links[1])",5000*(i+.8));
but neither worked.
----------------------------
Beau71 - MCSA
----------------------------