Hi, There is a lot going on in your pasted code. Your code seems to set elements to child-riga... and you are just looking for child-... in your jquery code. I could be wrong though. You will need to provide a simpler example (just the html produced by your server-side code). Putting it on http://jsbin.com would be a big help.
Dave On Jul 27, 3:44 pm, Vincenzo Ferme <[email protected]> wrote: > Hi, i’m Vincenzo, a web developer from Italy. I use your ajax code > following the guide ad the > example:http://www.javascripttoolbox.com/jquery/?doctype=strict > . I have some question about my work with your code, if can answer me. > > Here the question: > > The problem is that my code do not run on explorer 8, when I click on > td where I apply the function, child td are not showed. > > Here the code: > > <% > dim sqlcat, idcat, nome, pos, citta, indirizzo, telefono, cellulare, > sito, mail, persona, arrivare, descrizione, tipologia, mappa, > numcatpres > > '----------------------------- ELENCO RISORSE > -----------------------------' > sub listRisorse() > %> > <br /> > <h1>GESTIONE CATEGORIE/RISORSE</h1> > <div id="notice"><%= request("notice") %></div> > <p class="center"> > <input type="button" value="Inserisci Nuova Categoria" > onclick="window.location.href='<%= url %>?action=newcat'" /> > <% > 'Conto le categorie perchè il pulsante per aggiungere > contenuti si > deve attivare solo in caso vi siano categorie > sqlcat="SELECT COUNT(*) AS numcatpres FROM Categorie" > dbOpen(sqlcat) > numcatpres=objRS("numcatpres") > dbClose(true) > if numcatpres<>0 then > %> > > <input type="button" value="Inserisci Nuovo Contenuto" > onclick="window.location.href='<%= url %>?action=new'" /> > <% end if %> > <!--Precarico le immagini necessarie--> > <img src="../../images/frecciadown.png" style="display:none; > visibility:hidden" /> > <img src="../../images/frecciaup.png" style="display:none; > visibility:hidden" /> > <br /><br /> > </p> > <% > > 'Seleziono le eventuali categorie presenti > sqlcat="SELECT C.ID AS idcat, C.nome AS nome, C.pos AS pos FROM > Categorie C ORDER BY C.pos" > > dbOpen(sqlcat) > > if not objRS.EOF then > %> > <script> > $(function() { > $('td.title') > .click(function(){ > $('tr').siblings('.child-'+this.id).toggle(); > > if > ($('div.visualizza'+this.id).css('background-image').search(/ > frecciadown.png/)!=-1 ) { > $('div.visualizza'+this.id).css('background-image', > "url > (/images/frecciaup.png)"); > > $('div.visualizza'+this.id).attr("title","Nascondi i contenuti"); > > $('tr[alt^=bottom'+this.id+']').toggle(); > } else { > $('div.visualizza'+this.id).css('background-image', > "url > (/images/frecciadown.png)"); > > $('div.visualizza'+this.id).attr("title","Mostra i contenuti"); > > $('tr[alt^=bottom'+this.id+']').toggle(); > } > > }); > $('div.[class^=visualizza]').css("cursor","pointer"); > $('div.[class^=visualizza]').css("background-image", > "url(/images/ > frecciadown.png)"); > $('div.[class^=visualizza]').attr("title","Mostra i > contenuti"); > $('tr[class^=child-]').hide().children('td'); > $('tr[alt^=bottomriga]').hide(); > <% if request("cat")<> "" then %> > $('tr[class^=child-riga<% > =request("cat")%>]').toggle(); > $('tr[alt^=bottomriga<% =request("cat")%>]').toggle() > $('div.visualizzariga'+<% > =request("cat")%>).attr("title","Nascondi > i contenuti"); > $('div.visualizzariga'+<% =request("cat")%>).css('background- > image', "url(/images/frecciaup.png)"); > <% end if %> > }); > </script> > <% > dim counter, titlecat, classtag > counter=0 > titlecat=0 > > DO WHILE NOT objRS.EOF > > 'Seleziono gli eventuali contenuti associati alla categoria > sql="SELECT nome FROM Risorse WHERE IDcat=" & objRS("idcat") > dbOpen2(sql) > if not objRS2.EOF then > classtag="title" > else > classtag="titleno" > end if > titlecat=objRS("idcat") > %> > <table id="tabellaRisorse"> > > <tbody> > <tr> > <td colspan="4"> > <table width="100%" style="height:21px;"> > <tr> > <td class="<%=classtag%>" id="riga<% =titlecat %>" > style="width: 20px; height:21px;"> > <div style="float:left; width:20px; height: 21px; margin- > right: 5px; margin-top: 2px;" class="visualizzariga<% =titlecat > %>"> </div></td> > <td> > <div style="left: 50%; float: left; margin-top:2px;"> > <b id="<% =objRS("idcat")%>" class="edit_area"><%= UCase > (objRS("nome")) %></b> > </div> > </td> > <td width="155" style="text-align:left;padding-bottom: > 2px;"> > <b>Pos:</b> <b id="<% =objRS("idcat")%>" > class="edit_area_pos"><%= objRS("pos") %></b> > </td> > <td width="30" style="text- > align:left;background:#006600;color:#FFF;padding-bottom: 5px;"> > <div style="position: relative; float:right; text- > align:left;"><a href="<%= url %>?action=delCat&cat=<%= objRS > ("idcat") %>&nome=<%= Server.URLEncode(objRS("nome")) %>" > style="color:#FFF;">Elimina</a></div> > </td> > </tr> > </table> > </td> > </tr> > <% > > if objRS2.EOF then > %> > > <script> > $(function() { > /*Visualizzo il corretto messaggio sul pulsante di > visualizzazione dei contenuti*/ > $('div.visualizzariga'+<% =objRS("idcat")%>).attr > ("title","Nessun contenuto presente"); > $('div.visualizzariga'+<% =objRS("idcat")%>).css > ("cursor","default"); > }); > </script> > > <% > end if > dbClose2(true) > 'Seleziono gli eventuali contenuti associati alla categoria > sql="SELECT * FROM Risorse WHERE IDcat=" & objRS("idcat") > dbOpen2(sql) > counter=0 > DO WHILE NOT objRS2.EOF > %> > <tr class="child-riga<% =titlecat %>" <% if counter mod 2 = 0 > then > %>style="background:#006600;" id="green"<% end if %>> > <td <% if counter mod 2 = 0 then %>style="color: #FFF;"<% end > if %>>< > %= objRS2("nome") %></td> > <td width="80" class="center"><a href="<%= url %>? > action=edit&id=<%= objRS2("ID") %>&cat=<%= objRS("idcat") > %>">Modifica</a></td> > <td width="80" class="center"><a href="<%= url > %>?action=del&id=< > %= objRS2("ID") %>&cat=<%= objRS("idcat") %>&nome=<%= > Server.URLEncode(objRS2("nome")) %>">Elimina</a></td> > <td width="50" class="center"><a href="<%= url %>? > action=listFoto&id=<%= objRS2("ID") %>&cat=<%= objRS("idcat") > %>">Foto</a></td> > </tr> > <% > counter = counter + 1 > objRS2.MoveNext > LOOP > dbClose2(true) > %> > <tr <% if counter mod 2 = 0 then %> > style="background:#006600;" <% end if %>alt="bottomriga<% =titlecat > %>"> > <td colspan="4" class="title" id="riga<% =titlecat %>"> > <div style="float:right; width:20px; height: 21px; margin-top: > 2px;" class="visualizzariga<% =titlecat %>"> </div> > </td> > </tr> > </tbody> > </table> > <% > objRS.MoveNext > LOOP > %> > > <% > > end sub > > %> > > Thanks for all and sorry for the English, probably not perfect. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
