<?php $array = array( 'KAKA', 'KAKA2', 'KAKA3', 'KAKA4' ); if( $_GET['act'] == 'get' ) { $text = '<table border="0">'; foreach( $array as $key => $val ) { } $text .= '</table>'; header( 'Content-type: text/plain; iso-8859-2' ); echo $text; exit(); } else if( $_GET['act'] == 'delete' ) { unset( $array[$_GET['id']] ); exit(); } ?> <script type="text/javascript"> function delete_row( id ) { advAJAX.get({ url: 'ajax.php?act=delete&id='+id, onSuccess: function(obj) { Effect.Fade( 'row_'+id ); return false; } }); } function load() { advAJAX.get({ url: 'ajax.php?act=get', onLoading : function(obj) { }, onSuccess : function(obj) { document.getElementById( 'container' ).innerHTML = obj.responseText; } }); } onload = load(); </script>
efekt nie jest wykonywany ..... ( delete_row )
Wyrzuca:
Kod
Błąd: nie znaleziono elementu
Plik źródłowy: http://127.0.0.1/~other/ajax/ajax.php?act=delete&id=1&_uniqid=8031394756
Wiersz: 1, Kolumna: 1
Kod źródłowy:
^
Plik źródłowy: http://127.0.0.1/~other/ajax/ajax.php?act=delete&id=1&_uniqid=8031394756
Wiersz: 1, Kolumna: 1
Kod źródłowy:
^
i
Kod
Błąd: Effect is not defined
Plik źródłowy: http://127.0.0.1/~other/ajax/ajax.php#
Wiersz: 12
Plik źródłowy: http://127.0.0.1/~other/ajax/ajax.php#
Wiersz: 12
co robie zle ?