Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Pessoal, estou usando um script para rotacionar imagens, e quando a pessoa clica ele vai para outra página.
Só que não consigo fazer ele abrir em uma nova página.
O script é esse! http://www.tribosbrasil.com.br/telao/slideshow.htm
Obrigado desde já!!
<HTML> <HEAD> <TITLE>SlideShow by GB</TITLE> </HEAD> <BODY> <SPAN ID="_ImgURL"> <IMG ID="_ImgSpace" ONLOAD="OnImgLoad();" onclick="ImgLink(fotos[v_iImg][2])"> </SPAN><BR> <SPAN ID="_ImgDesc" STYLE="display: none;"> </SPAN> <INPUT TYPE="hidden" ID="btnPrev" VALUE=" << " ONCLICK="ImgPrev();"> <INPUT TYPE="hidden" ID="btnPlay" VALUE=" Pausar " ONCLICK="ImgPlay();"> <INPUT TYPE="hidden" ID="btnNext" VALUE=" >> " ONCLICK="ImgNext();"><BR> <script> var v_PlayMode = 0; var v_iImg = -1; var v_maxImg = 0; var fotos = new Array(); //* Configure as variáveis a seguir *************** // Defina o delay entre as imagens var timer = 4; // segundos // Mostrar descrição? var mostraDesc = 0; // 0 = Não, 1 = Sim // Usar links? var usarLink = 1; // 0 = Não, 1 = Sim // Sete o width (largura) e o height (altura) da imagem. // Deixe "" caso não queira adotar um tamanho fixo a todas as imagens. var ImgWidth = ""; // pixels var ImgHeight = ""; // pixels // Configure as imagens a seguir, a descrição e o link ao seu gosto // Se quiser adicionar mais fotos, insira: // fotos[v_maxImg++] = new Array("imagem.ext", "Descrição", "Link.html"); // Você também pode deixar o campo de Descrição e de Link em branco, se quiser. // Altere as variáveis mostraDesc e usarLink caso não queira alguma destas ferramentas. fotos[v_maxImg++] = new Array("1.jpg", "Descrição 1", "index1.html"); fotos[v_maxImg++] = new Array("2.jpg", "Descrição 2", "index2.html"); fotos[v_maxImg++] = new Array("4.jpg", "Descrição 3", "index3.html"); fotos[v_maxImg++] = new Array("5.jpg", "Descrição 4", "index4.html"); fotos[v_maxImg++] = new Array("6.jpg", "Descrição 5", "index5.html"); function ImgLink( sURL ) { // Para frames (edite o "nome_do_frame" para o TARGET adotado): // document.frames["nome_do_frame"].location.href = sURL; if( usarLink ) { document.location.href = sURL; } } //* As configurações acabam aqui ****************** //* Não edite nada daqui em diante **************** function DOM( sId ) { if( document.getElementById ) return document.getElementById( sId ); else if( document.all ) return document.all[ sId ]; } function ChangeImg( sBool ) { if( sBool ) { if( ++v_iImg == v_maxImg ) v_iImg = 0; } else { if( v_iImg == 0 ) v_iImg = v_maxImg; v_iImg--; } ImgUpdate(); } function ImgUpdate() { if( ImgWidth != "" || ImgHeight != "" ) { DOM("_ImgSpace").style.width = ImgWidth + "px"; DOM("_ImgSpace").style.height = ImgHeight + "px"; } DOM("_ImgSpace").src = fotos[v_iImg][0]; if( mostraDesc ) { DOM("_ImgDesc").style.display = "block"; DOM("_ImgDesc").innerHTML = fotos[v_iImg][1]; } if( usarLink ) { DOM("_ImgURL").style.cursor = "hand"; } } function ImgPlay() { v_PlayMode = !v_PlayMode; if( v_PlayMode ) { DOM("btnPlay").value = " Pausar "; DOM("btnPrev").disabled = true; DOM("btnNext").disabled = true; ImgNext(); } else { DOM("btnPlay").value = "Começar"; DOM("btnPrev").disabled = false; DOM("btnNext").disabled = false; } } function OnImgLoad() { if( v_PlayMode ) window.setTimeout("Change()", timer*1000); } function Change() { if( v_PlayMode ) { ImgNext(); } } function ImgNext() { ChangeImg(true); } function ImgPrev() { ChangeImg(false); } if( document.getElementById || document.all ) window.onload = ImgPlay; </SCRIPT> </BODY></HTML>Carregando comentários...