Qaiser Mehmood

Qaiser Mehmood

  • NA
  • 105
  • 0

slider should close when open new window

Mar 26 2009 3:35 AM

i don't know very well jsp  so  according to this slider is always open  when  new window open i want it should be close and after click slider window should open  what chnages should be.?

 

<script type="text/javascript" language="javascript">

var sliderIntervalId = 0;

var sliderHeight = 232;

var sliding =false;

var slideSpeed = 10;

function Slide()

{

if(sliding)

return;

sliding =true;

if(sliderHeight == 232)

sliderIntervalId = setInterval('SlideUpRun()', 30);

else

sliderIntervalId = setInterval('SlideDownRun()', 30);

}

function SlideUpRun()

{

slider = document.getElementById('sliderElementId');

if(sliderHeight <= 0)

{

sliding = false;

sliderHeight = 0;

slider.style.height = '0px';

clearInterval(sliderIntervalId);

}

else

{

sliderHeight -= slideSpeed;

if(sliderHeight < 0)

sliderHeight = 0;

slider.style.height = sliderHeight + 'px';

}

}

function SlideDownRun()

{

slider = document.getElementById('sliderElementId');

if(sliderHeight >= 232)

{

sliding = false;

sliderHeight = 232;

slider.style.height = '232px';

clearInterval(sliderIntervalId);

}

else

{

sliderHeight += slideSpeed;

if(sliderHeight > 232)

sliderHeight = 232;

slider.style.height = sliderHeight + 'px';

}

}

</script>