<?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[jquery ajax() json]]></title><description><![CDATA[<p dir="auto">Ciao a tutti ho questo script che funziona perfettamente su firefox ma si blocca a comuni su IE con errore:</p>
<p dir="auto">previsto ')' alla linea 196</p>
<pre><code>$('select#regione').change(function() {
        if ($('select#regione option:selected').attr('value') !== ' ') {
            $('div#province').show();
            $('select#provincia').html('&lt;option class="provincia"&gt;attendere&lt;/option&gt;');
            var regione = $("select#regione option:selected").attr('value');
            regione = regione.toLowerCase();
                
            $.ajax({
                type: 'GET',
                dataType: 'html',
                url: 'ajax.php',
                data: 'regione='+regione,
                success: function (response){
                    var provincia = eval('(' + response + ')');
                    var i = 0;
                    var count = provincia.length;
                    $('select#provincia').html('&lt;option class="provincia" value=" "&gt;TUTTE&lt;/option&gt;');
                    while (i&lt;count) {
                        $('select#provincia').append('&lt;option class="provincia"&gt;'+ provincia[i].toUpperCase() +'&lt;/option&gt;');
                        i++;
                    }    
                },
                error: function(request,error) {
                    alert ( " Can't do because: " + error );
                }
            });
        } else {
            $('div#province').hide();
            $('select#province option:selected').attr('value',' ');
            $('div#comuni').hide();
            $('select#comuni option:selected').attr('value',' ');
        }
    });
    
    
    $('select#provincia').change(function() {
        if( $('select#provincia option:selected').attr('value') !== ' ') {
            $('div#comuni').show();
            $('select#comune').html('&lt;option class="comune"&gt;attendere&lt;/option&gt;');
            var provincia1 = $("select#provincia option:selected").attr('value');
            provincia1 = provincia1.toLowerCase();
                
            $.ajax({
                type: 'GET',
                dataType: 'html',
                url: 'ajax.php',
                data: 'provincia='+provincia1,
                success: function (response){
                    var comune = eval('(' + response + ')');
                    var i = 0;
                    var count = comune.length;
                    $('select#comune').html('&lt;option class="comune" value=" "&gt;TUTTI&lt;/option&gt;');
                    while (i&lt;count) {
                        $('select#comune').append('&lt;option class="comune"&gt;'+ comune[i].toUpperCase() +'&lt;/option&gt;');
                        i++;
                    }    
                },
                error: function(request,error) {
                    alert ( " Can't do because: " + error );
                }
            });
        } else {
            $('div#comuni').hide();
            $('select#comuni option:selected').attr('value',' ');
        }
    });
</code></pre>
<p dir="auto">l'ultima riga funzionante credo sia</p>
<pre><code> $('select#comune').html('&lt;option class="comune"&gt;attendere&lt;/option&gt;');
</code></pre>
<p dir="auto">Poi non compaiono i comuni.</p>
<p dir="auto">L'ho anche validato con jslist e a parte un paio di errori su uno script che non c'entra nulla è tutto perfetto..</p>
<p dir="auto">IE mi da anche errore al caricamento con 'JSON' non definito perchè?</p>
<p dir="auto">Qualche idea?</p>
]]></description><link>https://dev.connect.gt/topic/144161/jquery-ajax-json</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 20:24:14 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/144161.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Jan 2011 11:51:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to jquery ajax() json on Thu, 03 Feb 2011 01:17:37 GMT]]></title><description><![CDATA[<p dir="auto">prova cosi:</p>
<pre><code>$result = "{'prezzo':'".$rowprezzo[prezzo]."','step':'".$rowcat[step]."'}";
</code></pre>
]]></description><link>https://dev.connect.gt/post/969595</link><guid isPermaLink="true">https://dev.connect.gt/post/969595</guid><dc:creator><![CDATA[ayrton2001]]></dc:creator><pubDate>Thu, 03 Feb 2011 01:17:37 GMT</pubDate></item><item><title><![CDATA[Reply to jquery ajax() json on Tue, 01 Feb 2011 08:08:29 GMT]]></title><description><![CDATA[<p dir="auto">json si trova nella pagina richiamata da ajax().</p>
<p dir="auto">è semplicemente l'array</p>
<pre><code>$result = "{'prezzo':".$rowprezzo[prezzo].",'step':".$rowcat[step]."}";
</code></pre>
<p dir="auto">mentre un'altra array è specificata con json_encode</p>
]]></description><link>https://dev.connect.gt/post/969625</link><guid isPermaLink="true">https://dev.connect.gt/post/969625</guid><dc:creator><![CDATA[mr.piter]]></dc:creator><pubDate>Tue, 01 Feb 2011 08:08:29 GMT</pubDate></item><item><title><![CDATA[Reply to jquery ajax() json on Fri, 28 Jan 2011 18:12:36 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>Mr_Piter</strong></p>
<p dir="auto">però l'errore JSON è definito rimane..</p>
</blockquote>
<p dir="auto">Ciao Mr_Piter,<br />
JSON non l'ho riesco a trovare nel codice da te fornito. In che riga ed in quale file è relativo il suddetto errore?</p>
]]></description><link>https://dev.connect.gt/post/969594</link><guid isPermaLink="true">https://dev.connect.gt/post/969594</guid><dc:creator><![CDATA[ayrton2001]]></dc:creator><pubDate>Fri, 28 Jan 2011 18:12:36 GMT</pubDate></item><item><title><![CDATA[Reply to jquery ajax() json on Thu, 27 Jan 2011 12:27:28 GMT]]></title><description><![CDATA[<p dir="auto">risolto.. nn avevo specificato i value..</p>
<p dir="auto">però l'errore JSON è definito rimane..</p>
]]></description><link>https://dev.connect.gt/post/969626</link><guid isPermaLink="true">https://dev.connect.gt/post/969626</guid><dc:creator><![CDATA[mr.piter]]></dc:creator><pubDate>Thu, 27 Jan 2011 12:27:28 GMT</pubDate></item></channel></rss>