<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[modificare File Js]]></title><description><![CDATA[<p dir="auto">Buon Giorno</p>
<p dir="auto">Avrei bisogno di un idea per modificare lo script seguente in modo da separare l'HTML da javascript:</p>
<pre><code class="language-html">var speed=4

iens6=document.all||document.getElementById


if (iens6){
document.write('&lt;div id="container" style="position:relative;width:155px;height:160px;overflow:hidden;border:2px ridge white"&gt;')
document.write('&lt;div id="content" style="position:absolute;width:155px;left:0px;top:0px"&gt;')
}
&lt;/script&gt;


&lt;!--contenuto--&gt;
prova prova prova prova&lt;br&gt;&lt;br&gt;
a b c d ...e cosi via &lt;br&gt; &lt;br&gt; &lt;br&gt;
prova prova prova prova&lt;br&gt;&lt;br&gt;
&lt;!--fine--&gt;



&lt;script language="JavaScript"&gt;
if (iens6){
document.write('&lt;/div&gt;&lt;/div&gt;')
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
if (window.moveupvar) clearTimeout(moveupvar)
if (iens6&amp;&amp;parseInt(crossobj.style.top)&gt;=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&amp;&amp;crossobj.top&gt;=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}

function moveup(){
if (window.movedownvar) clearTimeout(movedownvar)
if (iens6&amp;&amp;parseInt(crossobj.style.top)&lt;=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&amp;&amp;crossobj.top&lt;=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)
}

function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)
}

function movetop(){
stopscroll()
if (iens6)
crossobj.style.top=0+"px"
else if (ns4)
crossobj.top=0
}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
&lt;/script&gt;
</code></pre>
<p dir="auto">Qualche idea di come si possa fare in modo abbastanza semplice, senza dover riscrivere tutto?</p>
<p dir="auto">Ringrazio in anticipo delle risposte</p>
]]></description><link>https://dev.connect.gt/topic/145992/modificare-file-js</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 12:53:11 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/145992.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Feb 2011 13:00:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to modificare File Js on Mon, 21 Feb 2011 18:48:38 GMT]]></title><description><![CDATA[<p dir="auto">...risolto da solo....<br />
...ho riscritto tutto che si fa prima....</p>
]]></description><link>https://dev.connect.gt/post/976117</link><guid isPermaLink="true">https://dev.connect.gt/post/976117</guid><dc:creator><![CDATA[felipe35]]></dc:creator><pubDate>Mon, 21 Feb 2011 18:48:38 GMT</pubDate></item></channel></rss>