YeS RiP: auto click link in javascript
gravatar

auto click link in javascript

auto click link in javascript

i am new in js and i have a problem on auto click a link..after the slide show of the images i want to auto click the last image, is it possible?
this code below that i have search it redirect the link without showing the image slide show..

  1. <script type="text/javascript">


  2. function init(){


  3. var linkPage = document.getElementById('dynLink').href;

  4. window.location.href = linkPage;

  5. }


  6. onload=init;


  7. </script>




  8. <li class="sliderImage">

  9. <a href="http://damario-coburg.de/restaurant.htm"><img src="dama_images/img_intro2.jpg" alt="2" /></a>

  10. <span><!-- IMPORTANT: do not remove the <span></span> tag --></span></li>


  11. <li class="sliderImage">

  12. <a href="http://damario-coburg.de/restaurant.htm"><img src="dama_images/img_intro3.jpg" alt="3" /></a>

  13. <span><!-- IMPORTANT: do not remove the <span></span> tag --></span></li>


  14. <li class="sliderImage">

  15. <a href="http://damario-coburg.de/restaurant.htm" id="dynLink"><img src="dama_images/img_intro4.jpg" alt="4" /></a>

  16. <span><!-- IMPORTANT: do not remove the <span></span> tag --></span></li>