View Full Version : StepCarousel + OpenNewWindow

11-24-2009, 05:15 PM
I put on my site the step carousel. I want now that when one of the picture is clicked it opens a new browser window.

<div class='panel'>
<a href='#' onclick='javascript:NewWindow('http://pluspixel.com.br/blogger/marcas.html','name','850','500','yes') ;return false'><img border='0' height='120' src='http://www.pluspixel.com.br/blogger/images/index_marcas-pearce.gif' width='200'/></a>

Where should I put the following code?

<script type='text/javascript'>
var win = null;
function NewWindow(mypage,myname,w,h,scroll)
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+', scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)

Thanks. Claudio