Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Multiple Windows

Status
Not open for further replies.

MLyle

Technical User
Aug 6, 2000
10
US
Using JavaScript, I have an image, which clicking on it causes a window to open with additional text. Works fine. Now I want to put another image on the same page, click to open another, different, text window. I'm stuck. I know there must be something I'm leaving out, but what? Any help appreciated!
Martha [sig][/sig]
 
Try this...
Code:
<html>
<head>
<script language=&quot;javascript&quot;>
 function fnOpenWindow(page){
  var winVars = &quot;width=400,height=300,top=10,left=10&quot;;
  var winOpen = window.open(page,&quot;winName&quot;,winVars);
 }
</script>
</head>
<body>
 <a href=&quot;javascript:fnOpenWindow('page1.html')&quot;><img src=&quot;image1.gif&quot; border=0></a><br>
 <a href=&quot;javascript:fnOpenWindow('page2.html')&quot;><img src=&quot;image2.gif&quot; border=0></a><br>
 <a href=&quot;javascript:fnOpenWindow('page3.html')&quot;><img src=&quot;image3.gif&quot; border=0></a><br>
 <a href=&quot;javascript:fnOpenWindow('page4.html')&quot;><img src=&quot;image4.gif&quot; border=0></a><br>
 <a href=&quot;javascript:fnOpenWindow('page5.html')&quot;><img src=&quot;image5.gif&quot; border=0></a>
</body>
</html>
Hope this helps, [sig]<p>Rob<br><a href=mailto:robschultz@yahoo.com>robschultz@yahoo.com</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
"Focus on the solution to the problem,<br>
not the obstacles in the way."<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top