Mam Skrypt który ostatnio pisałem i inne kody modyfikowałem aby osiągnąć chciany efekt.. i osiągnąłem... ale tylko pod mozzilla... możecie mi powiedzieć dlaczego pod IE nie działa a pod Operą dziwnie wygląda?
z góry dzieki
oto kod:
var gUniqueRowID = 0;
//-----------------------------------------------------
function usuwaj_ajax(theRowID,co)
{
var table = document.getElementById( "users" );
var rowToDelete = document.getElementById( theRowID );
if (confirm("Czy Napewno Chcesz Usunąć tego uzytkownika?"))
{
//table.removeChild( rowToDelete );
//removeRowWithID( theRowID,co);
advAJAX.setDefaultParameters
({
onInitialization : function(obj)
{
var table = document.getElementById( "users" );
var newRow = document.createElement( "tr" );
table.appendChild( newRow );
gUniqueRowID += 1;
newRow.id = "queryItem" + gUniqueRowID;
var gRowText = "
<td colspan=8 align=center bgcolor=#FF0000><h1>Prosze Czekać!
</h1></td>";
str = gRowText.replace( /#ROWID#/g, ""+gUniqueRowID );
newRow.innerHTML = str;
},
onSuccess : function(obj)
{
var table2 = document.getElementById( "users" );
var rowToDelete2 = document.getElementById("queryItem"+gUniqueRowID);
table2.removeChild( rowToDelete2);
if(obj.responseText==1)
{
table.removeChild( rowToDelete );
}
else if(obj.responseText==0)
{
alert('ERROR! Nie Można Usunąć!');
}
else
{
alert('ERROR! Błędna Komenda!');
}
},
onError : function(obj)
{
alert('ERROR! Nie Można Usunąć!');
}
});
advAJAX.get({ url: "cmd.php?&cmd=delete&cmd2=users&id="+co, tag: "dostepnosc" });
advAJAX.setDefaultParameters({});
}
}
//-----------------------------------------------------
function removeRowWithID( theRowID,co)
{
var table = document.getElementById( "users" );
var rowToDelete = document.getElementById( theRowID );
if (confirm("Czy Napewno Chcesz Usunąć tego uzytkownika?"))
table.removeChild( rowToDelete );
}
//-----------------------------------------------------
function start()
{
newRow('1','Nazwisko,'Imie','wouga','#######','szczegoly','Szczegóły');
newRow('2','Nazwisko2,'Imie2','wouga2','#######','szczegoly','Szczegóły'); }
//-----------------------------------------------------
function newRow(id,nazwisko,imie,nick,email,akcja_l,akcja)
{
var table = document.getElementById( "users" );
var newRow = document.createElement( "tr" );
table.appendChild( newRow );
gUniqueRowID += 1;
newRow.id = "queryItem" + gUniqueRowID;
var gRowText = "
<td width=24 height=21>"+id+"
</td><td width=86 height=21>"+nazwisko+"
</td><td width=56 height=21>"+imie+"
</td><td width=82 height=21>"+nick+"
</td><td width=125 height=21>"+email+"
</td><td width=45 height=21><a href=\"?op=konta&cmd=edytuj&id="+id+"\">[Edytuj]
</a></td><td width=39 height=21><a href=\"java script:usuwaj_ajax('queryItem#ROWID#','"+id+"');\">[Usuń]
</a></td><td width=70 height=21><a href=\"?op=konta&cmd="+akcja_l+"&id="+id+"\">["+akcja+"]
</a></td>";
str = gRowText.replace( /#ROWID#/g, ""+gUniqueRowID );
newRow.innerHTML = str;
newRow.setAttribute("onmouseover", "this.style.background='#ababab'");
newRow.setAttribute("onmouseout", "this.style.background=''");
}
<table border="0" class="" cellpadding="2" cellspacing="2" style="border-collapse: collapse" bordercolor="#111111" width="544" height="52" id="users">
<td width="24" height="21">id
</td> <td width="86" height="21">Nazwisko
</td> <td width="56" height="21">Imię
</td> <td width="82" height="21">Nick
</td> <td width="125" height="21">E-mail
</td>
<td width="45" height="21">[Edytuj]
</td> <td width="39" height="21">[Usuń]
</td> <td width="70" height="21">[Akcja]
</td>