Salve ragazzi, come posso inserire degli effetti javascript (o dhtml) nel testo di una email in formato html, facendo in modo che siano eseguibili in visione?
tTipo questo codice:
<HTML>
<HEAD>
<!-- Codice scaricato gratuitamente da HTML.it, il sito italiano sul Web publishing
http://www.html.it -->
<TITLE>Demo Dynamic HTML: esempio pratico </TITLE>
<STYLE TYPE="text/css">
.fly {position:relative; color:navy; visibility:hidden}
</STYLE>
<LINK REL="stylesheet" HREF="../samples.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript">
function alignElements(el) {
/* Position the passed-in relatively positioned
element that is in the same coordinate system
on top of the element whose ID is src. */
el.style.pixelTop
= document.all.src.offsetTop - el.offsetTop;
el.style.pixelLeft
= document.all.src.offsetLeft - el.offsetLeft;
el.style.visibility = "visible";
}
function moveIn(el) {
// If the element is not at its position in the flow,
// move it closer.
var moved = false;
if (el.style.pixelTop < 0) {
el.style.pixelTop += 8;
if (el.style.pixelTop > 0)
el.style.pixelTop = 0;
moved = true;
}
else {
if (el.style.pixelTop > 0) {
el.style.pixelTop -= 8;
if (el.style.pixelTop < 0)
el.style.pixelTop = 0;
moved = true;
}
}
if (el.style.pixelLeft < 0) {
el.style.pixelLeft += 8;
if (el.style.pixelLeft > 0)
el.style.pixelLeft = 0;
moved = true;
}
else {
if (el.style.pixelTop > 0) {
el.style.pixelLeft -= 8;
if (el.style.pixelLeft < 0)
el.style.pixelLeft = 0;
moved = true;
}
}
/* The move variable reflects whether the element has
moved. If the element has already reached its position
in the flow, this function returns false. */
return moved;
}
function flyInTogether() {
var more = false;
// Animate into place all elements with class name fly.
for (var intLoop = 0; intLoop < document.all.length;
intLoop++) {
if ("fly" == document.all[intLoop].className)
more = moveIn(document.all[intLoop]) || more;
}
// Keep running until all elements reach their locations
// in the flow.
if (more)
setTimeout("flyInTogether()", 10);
}
function setup() {
// Align all elements that are going to be animated.
for (var intLoop = 0; intLoop < document.all.length;
intLoop++) {
if ("fly" == document.all[intLoop].className)
alignElements(document.all[intLoop]);
}
flyInTogether();
}
window.onload = setup;
</SCRIPT>
</HEAD>
<BODY bgcolor="white" >
<H1 ID=src>Dynamic HTML.it</H1>
<UL>
<LI CLASS="fly">
Il primo sito in italiano su Dhtml.</P>
<LI CLASS="fly">
Decine di demo facilmente esportabili.</P>
<LI CLASS="fly">
Decine di link ad altri siti.</P>
<LI CLASS="fly">
Teoria e concetti di Dhtml.</P>
<LI CLASS="fly">
Newsletter informativa.</P>
<LI CLASS="fly">
Tutto in italiano.</P>[/list]
</body>
</html>