<?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[Problema doppio: textareas e testo preformattato]]></title><description><![CDATA[<p dir="auto">Salve.<br />
Ho avuto bisogno di inserire codice da fare copiaincollare all'utenza, quindi ho pensato alle semplici textarea.<br />
Nelle mie pagine web, ed anche in altri casi (praticamente tutti) sono venuto a scoprire però che in nessun modo riesco ad inserire due **textarea **o più senza che mi succeda del caos. Infatti con una textarea non succede nulla, ma la seconda, come anche la terza e cosi' via, non mi si visualizza e soprattutto mi cancella completamente tutto il sorgente che viene di seguito a quest'ultima textarea; un brutto macello, e non capisco il perchè.</p>
<p dir="auto">Ho cancellato il secondo probloema perchè ho risolto.<br />
Grazie ancora <img src="https://connect.gt/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=4as8rolt52f" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /></p>
<p dir="auto">Alessio F.</p>
]]></description><link>https://connect.gt/topic/113657/problema-doppio-textareas-e-testo-preformattato</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 13:17:47 GMT</lastBuildDate><atom:link href="https://connect.gt/topic/113657.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Oct 2009 16:10:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problema doppio: textareas e testo preformattato on Thu, 19 Nov 2009 14:28:24 GMT]]></title><description><![CDATA[<p dir="auto">Non ci avevo pensato, tutto chiarissimo. Grazie tante. Proviamo la soluzione javascript escape.</p>
]]></description><link>https://connect.gt/post/867746</link><guid isPermaLink="true">https://connect.gt/post/867746</guid><dc:creator><![CDATA[expertwers]]></dc:creator><pubDate>Thu, 19 Nov 2009 14:28:24 GMT</pubDate></item><item><title><![CDATA[Reply to Problema doppio: textareas e testo preformattato on Wed, 18 Nov 2009 16:45:20 GMT]]></title><description><![CDATA[<p dir="auto">No, devi fare l'escape dei caratteri speciali dell'html, ad esempio con la funzione *htmlspecialchars *di php oppure con qualche trucchetto in javascript</p>
<p dir="auto">ti posto un esempio in javascript:</p>
<p dir="auto">[html]&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" rel="nofollow ugc">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;<br />
&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow ugc">http://www.w3.org/1999/xhtml</a>"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /&gt;<br />
&lt;title&gt;Test&lt;/title&gt;<br />
&lt;script type="text/javascript"&gt;<br />
function escape()<br />
{<br />
var div = document.getElementById('codice');</p>
<pre><code>var divContent = div.innerHTML;
div.innerHTML = htmlspecialchars(divContent);
</code></pre>
<p dir="auto">}</p>
<p dir="auto">function htmlspecialchars(p_string) {<br />
p_string = p_string.replace(/&amp;/g, '&amp;');<br />
p_string = p_string.replace(/&lt;/g, '&lt;');<br />
p_string = p_string.replace(/&gt;/g, '&gt;');<br />
p_string = p_string.replace(/"/g, '"');<br />
//    p_string = p_string.replace(/'/g, ''');<br />
return p_string;<br />
};</p>
<p dir="auto">&lt;/script&gt;<br />
&lt;style type="text/css"&gt;<br />
<a class="plugin-hashtag-a" href="https://connect.gt/hashtags/codice">#codice</a> {<br />
width:300px;<br />
overflow:auto;<br />
font-family:"Courier New", Courier, monospace;<br />
border:solid 1px <a class="plugin-hashtag-a" href="https://connect.gt/hashtags/666">#666</a>;<br />
white-space:pre;<br />
}<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body onload="escape()"&gt;<br />
&lt;div id="codice"&gt;&lt;object width="425" height="344"&gt;<br />
&lt;param name="movie" value="</p><div class="embed-wrapper"><div class="embed-container"><iframe src="https://www.youtube.com/embed/920BnH5bRJk"></iframe></div></div>"&gt;<br />
&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;<br />
&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;<br />
&lt;embed src="<div class="embed-wrapper"><div class="embed-container"><iframe src="https://www.youtube.com/embed/920BnH5bRJk"></iframe></div></div>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;<br />
&lt;/object&gt;&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;[/html]Ovviamente io preferisco la soluzione in php e fogli di stile e script esterni al codice. È un esempio fatto al volo<p></p>
]]></description><link>https://connect.gt/post/867754</link><guid isPermaLink="true">https://connect.gt/post/867754</guid><dc:creator><![CDATA[francesco.zeno]]></dc:creator><pubDate>Wed, 18 Nov 2009 16:45:20 GMT</pubDate></item><item><title><![CDATA[Reply to Problema doppio: textareas e testo preformattato on Wed, 18 Nov 2009 15:37:37 GMT]]></title><description><![CDATA[<p dir="auto">E sarà possibile lo stesso inserire del codice all'interno del div overflow?</p>
]]></description><link>https://connect.gt/post/867745</link><guid isPermaLink="true">https://connect.gt/post/867745</guid><dc:creator><![CDATA[expertwers]]></dc:creator><pubDate>Wed, 18 Nov 2009 15:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to Problema doppio: textareas e testo preformattato on Tue, 17 Nov 2009 17:36:19 GMT]]></title><description><![CDATA[<p dir="auto">Potresti fare un &lt;div&gt; invece della textarea, con il CSS imposti l'<em>overflow</em> in <strong>scroll</strong> e metti un bordo. L'effetto visivo sarà identico a quello della textarea</p>
]]></description><link>https://connect.gt/post/867753</link><guid isPermaLink="true">https://connect.gt/post/867753</guid><dc:creator><![CDATA[francesco.zeno]]></dc:creator><pubDate>Tue, 17 Nov 2009 17:36:19 GMT</pubDate></item><item><title><![CDATA[Reply to Problema doppio: textareas e testo preformattato on Thu, 29 Oct 2009 13:56:39 GMT]]></title><description><![CDATA[<p dir="auto">Non è possibile vedere un esempio del codice che hai scritto? Così sinceramente è difficile capirci qualcosa...</p>
]]></description><link>https://connect.gt/post/867760</link><guid isPermaLink="true">https://connect.gt/post/867760</guid><dc:creator><![CDATA[ienavr]]></dc:creator><pubDate>Thu, 29 Oct 2009 13:56:39 GMT</pubDate></item></channel></rss>