ERLEDIGT
NEIN
NEIN
ANTWORTEN
1
1
ZUGRIFFE
377
377
EMPFEHLEN
-
Hallo Leute,
also in den letzten Tage musste ich mich mit Jquery und Ajax beschäftigen und ich raff da überhaupt nix.
Hier mal ne Funktion für einen Link
PHP-Code:
die Arrays erstelle ich ganzoben inden seiten
<!--StartTemplate mit der Navigation //-->
<div id="customerlist">
<div id="Customerhead" class="custhead"><h3 class="h3_custext">KundenListe</h3></div>
<div id="shortcutbar"><h3 class="h3_indica">«</h3></div>
<div class="clear"></div>
<ul class="custree">
<?php foreach($name AS $value){
$text = preg_replace("/, /", "_", $value);
echo "<li class=\"customerName CKUser\" id=\"$text\">$value</li>";
} ?>
</ul>
</div>
<!-- Nächstes Template was geladen wird //-->
<div id="customerlist">
<div id="Customerhead" class="custhead"><h3 class="h3_custext"><?php echo $_SESSION['CKuser']; ?></h3></div>
<div id="shortcutbar"><h3 class="h3_indica"><a>«</a></h3></div>
<div class="clear"></div>
<ul class="custree">
<?php foreach($CKTask AS $value){
echo "<li class=\"customerName CKtask\" id=\"$value\">$value</li>";
} ?>
</ul>
</div>
<!-- Letztes Templates was geladen wird //-->
<div id="customerlist">
<div id="Customerhead" class="custhead"><h3 class="h3_custext"><?php echo $_SESSION['CKuser']; ?></h3></div>
<div id="shortcutbar"><h3 class="h3_indica"><a>«</a></h3></div>
<div class="clear"></div>
<ul class="custree">
<?php foreach($CKwork AS $d => $value){
if($_POST['CKseltask']== $value['name']){
echo '<li class="customerName CKseltask"><h3 class="h3_cklist">'.$value['name'].'</h3><div class="clear"></div>
<ul class="subitem">';
foreach($value['sub'] AS $key => $item){
echo "<li id=\"$item\" class=\"dropptask\">$item</li>";
}
echo'
</ul>
</li>';
}
//echo '<p>'.$value.'</p>';
//print_r($value);
//echo '<li class="customerName"><a href="?task='.$value.'">'.$value.'</a></li>';
} ?>
</ul>
</div>Code javascript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
wird alles in einer js.Datei geschrieben function ladeKundenDaten() { $.post( "index.php", { "CKuser" : "1" }, function(data) { content = $(data); content.find('.CKUser').click(function() { ladeKategorieDaten($(this).attr('id')); return false; }); $("#leftbox").html(content); } ); } function ladeKategorieDaten(text) { $.post( "index.php", { "CKtask" : text }, function(data) { content = $(data); content.find('.CKtask').click(function() { ladeSubKategorieDaten($(this).attr('id')); return false; }); $("#leftbox").html(content); } ); } function ladeSubKategorieDaten(text) { $.post( "index.php", { "CKseltask" : text }, function(data) { $("#leftbox").html($(data)); }); } ladeKundenDaten();
Nun soll ich auch Rücksprunglinks einbauen. Aber wie? No Plan..
Kann mir einer Helfen? Bedanke mich schon mal
Gruss
Fredolin
-
14.07.11 13:42 #2
Das ist so Standardmäßig nicht möglich bei AJAX-Requests.
Es gibt aber auch dafür Plugins für jQuery.
Wenn ich mich recht erinnere heist das irgendwie "History...."
Vielleicht kann einer dazu mehr beitragen.Die Schweine von heute sind unsere Schnitzel von morgen!
Ähnliche Themen
-
Ajax -> $(ajax) Response Text Leer oder undefined
Von DiDiJo im Forum Javascript & AjaxAntworten: 4Letzter Beitrag: 19.11.10, 11:53 -
Nach Ajax.Updater weiteres Ajax ausführen
Von nick_beat20 im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 07.08.09, 01:51 -
Problem mit Firefox & Prototype (Ajax.Request & Ajax.Updater)
Von RipmaV im Forum Javascript & AjaxAntworten: 14Letzter Beitrag: 09.05.09, 12:32 -
[PROTOYPE/AJAX] Probleme mit Ajax.PeriodicalUpdater
Von Benzol im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 09.01.08, 22:16 -
Eclipse ATF Ajax Toolkit Framework zur Entwicklung von Ajax Anwendungen
Von Thomas Darimont im Forum Java Technology NewsAntworten: 0Letzter Beitrag: 09.11.06, 10:43





Zitieren
Login





