Ir para conteúdo
Fórum Script Brasil
  • 0

Link C/ Popup (codigo Anexo)


jissa

Pergunta

Só copiar e colar...

<!-- Adaptacao : jair.issa@linksat.com.br -->

<html>

<HEAD>

<script LANGUAGE="JavaScript">

<!-- Begin

var hmsg = new Array();

hmsg["home"] = new helpmsg(

"SB Home Page", "fancyheader", "plain", "Click, e acesse o melhor em Informação na Internet.");

hmsg["forum"] = new helpmsg(

"", "", "bold", "O Melhor em Forum de Discução.. ASP/ASP.NET, JavaScript / HTML.. e muiiiiito mais... confira");

hmsg["email"] = new helpmsg(

"Necessita de Scripts?? ", "h2", "italics", "Desenvolvimento de Sistemas Personalizados, Voce imagina nós criamos");

var myPopup = new helpbox("myPopup", hmsg, 275, 175, "#ffffee");

function helpmsg(header, hstyle, mstyle, message) {

this.DEFAULTHSTYLE = "plain";

this.DEFAULTMSTYLE = "plain";

this.header = header;

if (hstyle) this.hstyle = hstyle;

else this.hstyle = this.DEFAULTHSTYLE;

this.message = message;

if (mstyle) this.mstyle = mstyle;

else this.mstyle = this.DEFAULTMSTYLE;

return this;

}

new helpmsg();

helpmsg.prototype.show = show;

function show() {

var H = "<FONT FACE='arial'>" + this.header + "</FONT>";

if (this.hstyle == "h1") H = "<H1>" + H + "</H1>";

else if (this.hstyle == "h2") H = "<H2>" + H + "</H2>";

else if (this.hstyle == "h3") H = "<H3>" + H + "</H3>";

else if (this.hstyle == "h4") H = "<H4>" + H + "</H4>";

if (this.hstyle == "fancyheader") H = "<table width='75%'>" +

"<tr><td bgcolor='#6060ff' align='center' valign='center'>" +

"<H1><FONT COLOR='white'>" + H +

"</FONT></H1>" + "</td></tr></table>";

else if (this.hstyle == "italics")

H = "<I>" + H + "</I>";

var M = "<FONT FACE='arial'>" + this.message + "</FONT>";

if (this.mstyle == "plain") {}

if (this.mstyle == "italics") M = M.italics();

else if (this.mstyle == "bold") M = M.bold();

var htmlpage = "";

if (this.hstyle.indexOf("header")>=0)

htmlpage = H + M;

else htmlpage = H + "<BR>" + M;

return htmlpage;

}

function helpbox(name, hm, width, height, bgcolor) {

this.name = name;

this.helpmessage = hm;

this.timerHandle = null;

this.windowHandle = null;

this.DEFAULTWIDTH = 250;

this.DEFAULTHEIGHT = 150;

this.DEFAULTBGCOLOR = "#ffffcc";

this.POPUPDELAY = 100;

if (width) this.width = width;

else this.width = this.DEFAULTWIDTH;

if (height) this.height = height;

else this.height = this.DEFAULTHEIGHT;

if (bgcolor) this.bgcolor = bgcolor;

else this.bgcolor = this.DEFAULTBGCOLOR;

return this;

}

function startHelp(msgindex) {

var cmdstr="top." + this.name + ".showHelp('" + msgindex + "')";

this.timerHandle = setTimeout(cmdstr, this.POPUPDELAY);

}

function showHelp(msgindex) {

if (!this.windowHandle || !this.windowHandle.name || this.windowHandle.name=="")

this.windowHandle = window.open("", "subWindow","toolbar=no," +"location=no," +"directories=no," +"status=no," +"menubar=no," +"scrollbars=no," +"resizable=no," +"width=" + this.width + "," +"height=" + this.height);

else

this.windowHandle.focus();

this.windowHandle.document.open();

var to_page =

"<HTML>\n" +

"<BODY BGCOLOR='" + this.bgcolor + "'><P>" +

this.helpmessage[msgindex].show() +

"</BODY></HTML>\n";

this.windowHandle.document.write(to_page);

this.windowHandle.document.close();

}

function clearHelp() {

clearTimeout(this.timerHandle);

if (this.windowHandle && this.windowHandle.name) {

this.windowHandle.close();

this.windowHandle=null;

}

}

new helpbox();

helpbox.prototype.startHelp = startHelp;

helpbox.prototype.showHelp = showHelp;

helpbox.prototype.clearHelp = clearHelp;

// End -->

</script>

</HEAD>

<BODY>

<center>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p align="center">

<a href="https://www.scriptbrasil.com.br" onMouseOver="myPopup.startHelp('home')" onMouseOut="myPopup.clearHelp()">Script Brasil Home Page</a><br>

<br>

<a href="https://www.scriptbrasil.com.br/forum" onMouseOver="myPopup.startHelp('forum')" onMouseOut="myPopup.clearHelp()">Script Brasil Forum</a><br>

<br>

<a href="mailto:jair.issa@linksat.com.br" onMouseOver="myPopup.startHelp('email')" onMouseOut="myPopup.clearHelp()">Scripts Personalizados</a><br>

<br>

</p>

<p><p>

</body>

</html>

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

Mas ficou legal.. vou utilizar para descrever Sistemas .. tipo colocar as imagens.. e quando o Cliente colocar o muose sobre ela aparecera o popup..

mas pode ser alterado para o layer.. acho que fica mais rapido.. e não teria o problema dos programinhas que estao bloqueando popup

Link para o comentário
Compartilhar em outros sites

  • 0

aeee jissa e d+ amigos

em breve estarei colocando um site de javascripts (MEU) no ar.

um site que vai ter tudo quando é código javascript que eu já encontrei na net.

convido você e seus amigos interessados futuramente a visitar o meu site e se quiserem, publicar suas criações. todos javascripts serão bem vindos.

um abraço.

obs.: o endereço vai ser superjavascripts.kit.net

o site a principio não tera nada dinamico (acho), mas com o tempo qm sabe...

Link para o comentário
Compartilhar em outros sites

  • 0

Eu gostei deste para utilizar em Sistemas com ajuda.. mas como já escrevi.. o popup não esta adiantando muito desde que saiu estes Sistemas que impedem a utilizacao deles, tipo o do UOL..

o futuro sera o layer.. :)

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,9k
×
×
  • Criar Novo...