<?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[Convertire funzione checkbox in select]]></title><description><![CDATA[<p dir="auto">ciao, ho bisogno di un'aiuto<br />
vorrei modificare questa funzione in modo che nel form appaia un campo select anzichè tanti checkbox<br />
grazie</p>
<p dir="auto">$i = 0;</p>
<pre><code>            foreach ($this-&gt;serverList as $value) {

                if ($value['check'] == true) $checked=" checked='checked' ";

                else $checked = " ";

                

                echo '&lt;td&gt;&lt;input type="checkbox" name="tld_'.$value['tld'].'"'.$checked.' /&gt;.'.$value['tld'].'&lt;/td&gt;';

                $i++;                    

                if ($i &gt; 4) {

                    $i = 0;

                    echo '&lt;/tr&gt;&lt;tr&gt;';
</code></pre>
]]></description><link>https://dev.connect.gt/topic/142374/convertire-funzione-checkbox-in-select</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 16:07:09 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/142374.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Jan 2011 09:24:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Fri, 14 Jan 2011 23:19:37 GMT]]></title><description><![CDATA[<p dir="auto">Ciao, scusa la mia ignoranza, se tu conosci già i campi, perchè non li metti prima in un array e poi li schiatti nella select?</p>
<p dir="auto">Penso di aver capito bene? O forse no</p>
<p dir="auto">Ciao da danny</p>
]]></description><link>https://dev.connect.gt/post/962925</link><guid isPermaLink="true">https://dev.connect.gt/post/962925</guid><dc:creator><![CDATA[danny1975]]></dc:creator><pubDate>Fri, 14 Jan 2011 23:19:37 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 11 Jan 2011 10:38:31 GMT]]></title><description><![CDATA[<p dir="auto">non è vero, non ho risolto, in realtà funziona solo la ricerca di tld_com, questo perchè viene richiamato in &lt;select name="tld_com"&gt;, infatti se lo sostituisco con &lt;select name="tld_it"&gt; allora funziona la ricerca solo sul tld_it, le altre estensioni non vengono proprio considerate.</p>
<p dir="auto">allora ho provato a fare così,<br />
&lt;select name="tld_'.$value['tld'].'"&gt;<br />
ma nienete da fare comunque, qualche consiglio?, grazie</p>
]]></description><link>https://dev.connect.gt/post/962924</link><guid isPermaLink="true">https://dev.connect.gt/post/962924</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 11 Jan 2011 10:38:31 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 15:04:02 GMT]]></title><description><![CDATA[<p dir="auto">risolto, grazie</p>
<p dir="auto">function tldListH(){</p>
<pre><code>            $i = 0;
echo '&lt;tr&gt;&lt;td&gt;&lt;select name="tld_com"&gt;'; 
            foreach ($this-&gt;serverList as $value) {

                if ($value['check'] == true) $checked=" checked='checked' ";

                else $checked = " "; 
                 
                echo '&lt;option value='.$value['tld'].'&gt;'.$value['tld'].'&lt;/option&gt;'; 
                $i++;                     
                if ($i &gt; 100) { 
                    $i = 1; 
                    echo '&lt;/select&gt;&lt;/td&gt;&lt;t/r&gt;'; 
                } 
            } 
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://dev.connect.gt/post/962931</link><guid isPermaLink="true">https://dev.connect.gt/post/962931</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 15:04:02 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 13:46:01 GMT]]></title><description><![CDATA[<p dir="auto">tranqui, anzi, grazie</p>
<p dir="auto">si qualcosa del genere<br />
anche se preferirei, se fosse possibile, eliminare del tutto o checkbox e richiamare i dati con il select</p>
]]></description><link>https://dev.connect.gt/post/962930</link><guid isPermaLink="true">https://dev.connect.gt/post/962930</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 13:46:01 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 13:31:14 GMT]]></title><description><![CDATA[<p dir="auto">Dai prima o poi ci arriviamo... <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /><br />
Scusa sto facendo altre cose e non leggendo bene...</p>
<pre><code class="language-php">&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Test&lt;/title&gt;
        &lt;script type="text/javascript"&gt;
            function creaSelect(voci)
            {
                var mySelect = document.getElementById('selezione-label');
                var stringa="";
                for(indice=0;indice&lt;voci.length;indice++)
                {
                    stringa+="&lt;option value="+voci[indice].value+"&gt;"+voci[indice].value+"&lt;/option&gt;";
                    var divContenitore=document.getElementById('div'+(indice+1));
                    divContenitore.style.display="none";                                    
                }
                mySelect.innerHTML="&lt;select id='selezione' name='selezione'&gt;"+stringa+"&lt;/select&gt;";
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body onload="creaSelect(document.form.voci)"&gt;
        &lt;form id="form" name="form"&gt;
            &lt;div id="div1"&gt;&lt;input type="checkbox" name="voci" id="voci" value="Valore 1"&gt; Valore 1&lt;/div&gt;
            &lt;div id="div2"&gt;&lt;input type="checkbox" name="voci" id="voci" value="Valore 2"&gt; Valore 2&lt;/div&gt;
            &lt;div id="div3"&gt;&lt;input type="checkbox" name="voci" id="voci" value="Valore 3"&gt; Valore 3&lt;/div&gt;
            &lt;div id="div4"&gt;&lt;input type="checkbox" name="voci" id="voci" value="Valore 4"&gt; Valore 4&lt;/div&gt;
            &lt;div id="div5"&gt;&lt;input type="checkbox" name="voci" id="voci" value="Valore 5"&gt; Valore 5&lt;/div&gt;
            &lt;div&gt;SELEZIONE
                &lt;label id="selezione-label"&gt;
                    &lt;select id="selezione" name="selezione"&gt;&lt;/select&gt;
                &lt;/label&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/962933</link><guid isPermaLink="true">https://dev.connect.gt/post/962933</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Tue, 04 Jan 2011 13:31:14 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 13:19:51 GMT]]></title><description><![CDATA[<p dir="auto">no, niente del genere</p>
<p dir="auto">io vorrei che automaticamente i dati finissero nel select, senza più vedere un solo checkbox</p>
]]></description><link>https://dev.connect.gt/post/962927</link><guid isPermaLink="true">https://dev.connect.gt/post/962927</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 13:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 12:52:06 GMT]]></title><description><![CDATA[<p dir="auto">Una versione del genere?</p>
<pre><code class="language-php">&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Test&lt;/title&gt;
        &lt;script type="text/javascript"&gt;
            function generaSelect(voci)
            {
                var mySelect = document.getElementById('selezione-label');
                var stringa="";
                for(indice=0;indice&lt;voci.length;indice++)
                {
                    if(voci[indice].checked==true)
                    {
                        stringa+="&lt;option value="+voci[indice].value+"&gt;"+voci[indice].value+"&lt;/option&gt;";
                        var divContenitore=document.getElementById('div'+(indice+1));
                        divContenitore.style.display="none";
                    }                    
                }
                mySelect.innerHTML="&lt;select id='selezione' name='selezione'&gt;"+stringa+"&lt;/select&gt;";
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form id="form" name="form"&gt;
            &lt;div id="div1"&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 1"&gt; Valore 1&lt;/div&gt;
            &lt;div id="div2"&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 2"&gt; Valore 2&lt;/div&gt;
            &lt;div id="div3"&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 3"&gt; Valore 3&lt;/div&gt;
            &lt;div id="div4"&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 4"&gt; Valore 4&lt;/div&gt;
            &lt;div id="div5" &gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 5"&gt; Valore 5&lt;/div&gt;
            &lt;div&gt;SELEZIONE
                &lt;label id="selezione-label"&gt;
                    &lt;select id="selezione" name="selezione"&gt;&lt;/select&gt;
                &lt;/label&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/962932</link><guid isPermaLink="true">https://dev.connect.gt/post/962932</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Tue, 04 Jan 2011 12:52:06 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 11:56:08 GMT]]></title><description><![CDATA[<p dir="auto">lo script che voglio modificare è questo</p>
<p dir="auto"><a href="http://whois.soft64download.com" rel="nofollow ugc">whois.soft64download.com</a></p>
]]></description><link>https://dev.connect.gt/post/962923</link><guid isPermaLink="true">https://dev.connect.gt/post/962923</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 11:56:08 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 11:50:11 GMT]]></title><description><![CDATA[<p dir="auto">esattamente, vorrei eliminare completamente la checkbox e sostituirla con il select, solo che non riesco a capire come fare</p>
]]></description><link>https://dev.connect.gt/post/962922</link><guid isPermaLink="true">https://dev.connect.gt/post/962922</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 11:50:11 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 11:33:24 GMT]]></title><description><![CDATA[<p dir="auto">Ma cosi una volta checcati non spariscono?<br />
E se voglio tirarlo via dalla select?</p>
<p dir="auto">Quindi alla fine non è come ora solo che bisogna anche eliminare/non visualizzare la checkbox che viene abilitata?</p>
]]></description><link>https://dev.connect.gt/post/962929</link><guid isPermaLink="true">https://dev.connect.gt/post/962929</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Tue, 04 Jan 2011 11:33:24 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 11:15:18 GMT]]></title><description><![CDATA[<p dir="auto">no, il checkbox devo eliminarlo completamente e al suo posto avere solo il select<br />
per capirci meglio devo trasformarlo in una cosa del genere solo che così com'è sotto mi crea tanti select quanti erano i checkbox, io vorrei avere un solo select</p>
<p dir="auto">function tldListH(){<br />
$i = 0;<br />
foreach ($this-&gt;serverList as $value) {<br />
if ($value['check'] == true) $checked=" checked='checked' ";<br />
else $checked = " ";</p>
<pre><code>                echo '&lt;td&gt;&lt;select&gt;&lt;option value='.$value['tld'].'&gt;'.$value['tld'].'&lt;/option&gt;&lt;/td&gt;'; 
                $i++;                     
                if ($i &gt; 4) { 
                    $i = 0; 
                    echo '&lt;/tr&gt;&lt;tr&gt;'; 
                } 
            } 
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://dev.connect.gt/post/962921</link><guid isPermaLink="true">https://dev.connect.gt/post/962921</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 11:15:18 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 10:34:52 GMT]]></title><description><![CDATA[<p dir="auto">Una cosa del genere?</p>
<pre><code class="language-php">&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Test&lt;/title&gt;
        &lt;script type="text/javascript"&gt;
            function generaSelect(voci)
            {
                var mySelect = document.getElementById('selezione-label');
                var stringa="";
                for(indice=0;indice&lt;voci.length;indice++)
                {
                    if(voci[indice].checked==true)
                    {
                        stringa+="&lt;option value="+voci[indice].value+"&gt;"+voci[indice].value+"&lt;/option&gt;";                                
                    }                    
                }
                mySelect.innerHTML="&lt;select id='selezione' name='selezione'&gt;"+stringa+"&lt;/select&gt;";
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form id="form" name="form"&gt;
            &lt;div&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 1"&gt; Valore 1&lt;/div&gt;
            &lt;div&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 2"&gt; Valore 2&lt;/div&gt;
            &lt;div&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 3"&gt; Valore 3&lt;/div&gt;
            &lt;div&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 4"&gt; Valore 4&lt;/div&gt;
            &lt;div&gt;&lt;input type="checkbox" name="voci" id="voci" onclick="generaSelect(document.form.voci)" value="Valore 5"&gt; Valore 5&lt;/div&gt;
            &lt;div&gt;SELEZIONE
                &lt;label id="selezione-label"&gt;
                    &lt;select id="selezione" name="selezione"&gt;&lt;/select&gt;
                &lt;/label&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/962928</link><guid isPermaLink="true">https://dev.connect.gt/post/962928</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Tue, 04 Jan 2011 10:34:52 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 09:41:46 GMT]]></title><description><![CDATA[<p dir="auto">si, esattamente</p>
]]></description><link>https://dev.connect.gt/post/962920</link><guid isPermaLink="true">https://dev.connect.gt/post/962920</guid><dc:creator><![CDATA[bonox]]></dc:creator><pubDate>Tue, 04 Jan 2011 09:41:46 GMT</pubDate></item><item><title><![CDATA[Reply to Convertire funzione checkbox in select on Tue, 04 Jan 2011 09:27:52 GMT]]></title><description><![CDATA[<p dir="auto">Cioè se te hai tipo 5 checkbox.</p>
<p dir="auto">C1="Valore1"<br />
C2="Valore2"<br />
C3="Valore3"<br />
C4="Valore4"<br />
C5="Valore5"</p>
<p dir="auto">E Attivo 1,3,5.</p>
<p dir="auto">Deve comparire una select con Valore1,Valore3,Valore5?</p>
]]></description><link>https://dev.connect.gt/post/962926</link><guid isPermaLink="true">https://dev.connect.gt/post/962926</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Tue, 04 Jan 2011 09:27:52 GMT</pubDate></item></channel></rss>