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 /
h1GESTIONE 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 numcatpres0 then
%
nbsp;nbsp;
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
%nbsp;/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;
bPos:/b b id=% =objRS(idcat)%
class=edit_area_pos%= objRS(pos) %/b
/td
td width=30 style=text-