Web Analytics Made Easy -
StatCounter Rollover Popup Window - CodingForum

Announcement

Collapse
No announcement yet.

Rollover Popup Window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rollover Popup Window

    Hi Guys,

    I looking for script where I can mouseover the image and a new image appears in popup window. Any help will be highly appreciated.

    Thanks

  • #2
    Might help:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    * {
    	margin:0px;
    	padding:0px;
    }
    #container {
    	color:#555;
    	font-size:10pt;
    	font-family:"Trebuchet MS", Arial, Verdana, Tahoma;
    	width:630px;
    	height:530px;
    	margin-top:-215px;
    	margin-left:-315px;
    	margin:20px auto;
    }
    ul {
    	list-style-type:none;
    }
    ul li {
    	float:left;
    	margin:10px 3px;
    }
    ul li a img {
    	width:200px;
    	height:150px;
    	padding:1px;
    	border:1px solid #999;
    }
    </style>
    <script type="text/javascript">
    window.addEventListener?window.addEventListener('load',function () {
    	openNewWin();
    	},false):
    window.attachEvent('onload',function () {
    	openNewWin();
    	}); // FF : IE
    	
    function openNewWin() {
    	var imgA = document.getElementById('container').getElementsByTagName('a');
    	for (var i = 0 ; i < imgA.length; i++) {
    		imgA[i].onclick = function () {
    			window.open(this.getAttribute('href'),'mywin','width=500,height=400');
    			return false;
    		}
    	}
    }
    </script>
    <base href="http://rangana.moonylist.com/images/">
    </head>
    <body>
    <div id="container">
    	<ul>
    	<li><a href="Picture1.jpg"><img src="Picture1.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture2.jpg"><img src="Picture2.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture3.jpg"><img src="Picture3.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture4.jpg"><img src="Picture4.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture5.jpg"><img src="Picture5.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture6.jpg"><img src="Picture6.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture7.jpg"><img src="Picture7.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture8.jpg"><img src="Picture8.jpg" alt="MyPics"></a></li>
    	<li><a href="Picture9.jpg"><img src="Picture9.jpg" alt="MyPics"></a></li>
    	</ul>
    </div>
    </body>
    </html>
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

    Comment


    • #3
      Thanks rangana. Really appreciate.

      Comment

      Working...
      X