kostenloser Webspace werbefrei: lima-city


Hover Ad per Link öffnen

lima-cityForumDie eigene HomepageHTML, CSS & Javascript

  1. Autor dieses Themas

    dannysolingen

    Kostenloser Webspace von dannysolingen

    dannysolingen hat kostenlosen Webspace.

    Hey,

    mir wurden mit Hilfe eines Hover Ad Generators 2 Codes generiert, in das ein Video eingebunden ist. (siehe unten)

    Das ganze funktioniert wunderbar, wenn man die Seite aufruft, wird das (die?) Hover Ad automatisch aufgerufen.

    Allerdings möchte ich das ganze so einstellen, dass man auf eine Grafik klickt, damit sich das Hover Ad öffnet.

    Wie lautet der korrekte Code dazu, bzw. was muss ich umändern?

    Habe etwas gefunden wie: "<a href="" onClick="tuwas();return false;">Klick mich</a>", aber wo bzw wie kommt dann der Code hinein?

    Code 1 - Inhalt des Hover Ad's:

    <table border="0" cellpadding="3" cellspacing="0"><tr><td><font face="Verdana" size="2"></font><p><font face="Verdana" size="2"></font></p><p><font face="Verdana" size="2"> <object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/q70MimfroxM&hl=de_DE&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/q70MimfroxM&hl=de_DE&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></font></p></td></tr></table>

    Code 2 - Pop Code

    <SCRIPT language='JavaScript' type=text/javascript>
    <!--
    document.write("<table width='270' height='150' border='0' cellspacing='0' cellpadding='1' style='display:none;position:absolute;top:10px;left:10px;empty-cells:hide' id='v1771258909615268v181'>");document.write("<tr><td style='background: #062F91'>");document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>");document.write("<tr height='1'><td>");document.write("<table width='100%' border='0' cellspacing='1' cellpadding='0' style='background: #062F91; color: #FFFFFF; cursor: default'><tr style='font-family: Arial, sans-serif; font-size: 10pt; font-weight: bold'><td>4All-TV Video");document.write("<td style='width: 20px; cursor: pointer;' onclick='javascript:v1771258909615268v183();'>-");document.write("<td style='width: 20px; cursor: pointer;' onclick='javascript:v1771258909615268v184();'>X");document.write("</table>");document.write("<tr><td>");document.write("<table width='100%' height='100%' id='v1771258909615268v185' border='0' cellpadding='0' cellspacing='0' bgcolor='#E0E0F0'>");document.write("<tr>");document.write("<td>");document.write("<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr><td><font face=\"Verdana\" size=\"2\"></font><p><font face=\"Verdana\" size=\"2\"></font></p><p><font face=\"Verdana\" size=\"2\"> <object width=\"560\" height=\"340\"><param name=\"movie\" value=\"http://www.youtube.com/v/q70MimfroxM&hl=de_DE&fs=1&rel=0\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/q70MimfroxM&hl=de_DE&fs=1&rel=0\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"560\" height=\"340\"></embed></object></font></p></td></tr></table>");document.write("<tr style='height: 10px'><td style='text-align: center'><INPUT type='button' value='Schliessen' style='cursor: pointer' onclick='javascript:v1771258909615268v184();'>");document.write("</table></table></table>"); if ( document.getElementById ) v1771258909615268v186 = document.getElementById ( "v1771258909615268v181" ); else v1771258909615268v186 = document.all ["v1771258909615268v181"]; var v1771258909615268v187 = undefined; var v1771258909615268v188 = false; function v1771258909615268v183 ( ) { if ( document.getElementById ) v189 = document.getElementById ( "v1771258909615268v185" ); else v189 = document.all ["v1771258909615268v185"]; if ( v189.style.display == "none" ) { v189.style.display = ""; v1771258909615268v186.style.height = "150px"; } else { v189.style.display = "none"; v1771258909615268v186.style.height = "20px"; } } function v1771258909615268v184 ( ) { v1771258909615268v186.style.display = "none"; v1771258909615268v188 = true; } var v1771258909615268v175, v1771258909615268v176; var v1771258909615268v190, v1771258909615268v191; function v1771258909615268v192 ( ) { return ( ( window.pageXOffset ) ? window.pageXOffset : document.body.scrollLeft ) + v1771258909615268v190; } function v1771258909615268v193 ( ) { return ( ( window.pageYOffset ) ? window.pageYOffset : document.body.scrollTop ) + v1771258909615268v191; } function v1771258909615268v194 ( ) { var v195 = 500; v1771258909615268v186.style.top = v1771258909615268v193 ( ); v1771258909615268v186.style.left = v1771258909615268v192 ( ); setTimeout ( "v1771258909615268v194 ( );", v195 ); } function v1771258909615268v197 ( v198 ) { if ( v1771258909615268v190 != v1771258909615268v175 || v1771258909615268v191 != v1771258909615268v176 ) { if ( v1771258909615268v190 != v1771258909615268v175 ) if ( Math.abs ( v1771258909615268v190 - v1771258909615268v175 ) <= v1771258909615268v199 ) v1771258909615268v190 = v1771258909615268v175; else if ( v1771258909615268v190 < v1771258909615268v175 ) v1771258909615268v190 += v1771258909615268v199; else v1771258909615268v190 -= v1771258909615268v199; if ( v1771258909615268v191 != v1771258909615268v176 ) if ( Math.abs ( v1771258909615268v191 - v1771258909615268v176 ) <= v1771258909615268v199 ) v1771258909615268v191 = v1771258909615268v176; else if ( v1771258909615268v191 < v1771258909615268v176 ) v1771258909615268v191 += v1771258909615268v199; else v1771258909615268v191 -= v1771258909615268v199; v1771258909615268v186.style.top = v1771258909615268v193 ( ); v1771258909615268v186.style.left = v1771258909615268v192 ( ); setTimeout ( "v1771258909615268v197 ( " + v198 + " );", 20 ); } else if ( v198 ) v1771258909615268v194 ( ); else v1771258909615268v186.style.display = "none"; } function v1771258909615268v200 ( v201, v202 ) { v1771258909615268v175 = v201; v1771258909615268v176 = v202; v1771258909615268v190 = v201; v1771258909615268v191 = v202; var v205 = 0, v206 = 0; v206 = -v202 -150; if ( v205 != 0 && v206 != 0 ) if ( Math.abs ( v205 ) < Math.abs ( v206 ) ) v206 = v206 / Math.abs ( v206 ) * Math.abs ( v205 ); else v205 = v205 / Math.abs ( v205 ) * Math.abs ( v206 ); v1771258909615268v190 += v205; v1771258909615268v191 += v206; v1771258909615268v186.style.top = v1771258909615268v193 ( ); v1771258909615268v186.style.left = v1771258909615268v192 ( ); v1771258909615268v186.style.display = ""; v1771258909615268v197 ( true ); } function v1771258909615268v196 ( ) { if ( v1771258909615268v188 ) return; v1771258909615268v199 = undefined; var v205 = 0, v206 = 0; var v201 = v1771258909615268v175, v202 = v1771258909615268v176; v206 = -v202 -150; if ( v205 != 0 && v206 != 0 ) if ( Math.abs ( v205 ) < Math.abs ( v206 ) ) v206 = v206 / Math.abs ( v206 ) * Math.abs ( v205 ); else v205 = v205 / Math.abs ( v205 ) * Math.abs ( v206 ); v1771258909615268v175 += v205; v1771258909615268v176 += v206; v1771258909615268v186.style.top = v1771258909615268v193 ( ); v1771258909615268v186.style.left = v1771258909615268v192 ( ); v1771258909615268v186.style.display = ""; v1771258909615268v197 ( false ); } var v1771258909615268v199 = 24; setTimeout ( "v1771258909615268v200 ( 220, 100, 24 );", 1500 ); var v1771258909615268v217, v1771258909615268v218; function v1771258909615268v219 ( v220 ) { v221 = ( document.all ) ? event.clientX : v220.clientX; v222 = ( document.all ) ? event.clientY : v220.clientY; v1771258909615268v190 += v221 - v1771258909615268v217; v1771258909615268v191 += v222 - v1771258909615268v218; v1771258909615268v217 = v221; v1771258909615268v218 = v222; v1771258909615268v186.style.top = v1771258909615268v193 ( ); v1771258909615268v186.style.left = v1771258909615268v192 ( ); } function v1771258909615268v223 ( ) { } function v1771258909615268v224 ( ) { document.onmousemove = v1771258909615268v223; document.onmouseup = v1771258909615268v223; } function v1771258909615268v225 ( v220 ) { v1771258909615268v217 = ( document.all ) ? event.clientX : v220.clientX; v1771258909615268v218 = ( document.all ) ? event.clientY : v220.clientY; document.onmousemove = v1771258909615268v219; document.onmouseup = v1771258909615268v224; } v1771258909615268v186.onmousedown = v1771258909615268v225;
    //-->
    </SCRIPT>


    Beitrag zuletzt geändert: 22.11.2009 19:41:36 von dannysolingen
  2. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

  3. r*s

    Du schreibst dein JavaScript als Funktion

    <script language="JavaScript">
    <!--
    function popup()
    {
    document.write("<table width='270' ... 
    }
    //-->
    </script>


    und anstelle von tuwas() rufst du die Funktion popup() auf. Das JavaScript muss im head Berreich stehen ;-)

    Beitrag zuletzt geändert: 22.11.2009 20:59:32 von rms
  4. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

Dir gefällt dieses Thema?

Über lima-city

Login zum Webhosting ohne Werbung!