Jquery Gritter Notification nach absenden und verarbeiten eines Formulares

dennis-sauer

Erfahrenes Mitglied
Hallo,

ich steh auf'm Schlauch...

Ich habe ein einfaches Forumlar, welches mit PHP verschickt wird:
PHP:
if (isset( $_POST['sendit'] ))
{


// Deklarieren der benötigten Variablen
		$caid = $_POST["caid"];
		$coid = $_POST["coid"];
		$comment = $_POST["comment"];
		$name = $_POST["name"];

// Jetzt wird in wiki_comment der Thread geschrieben und sonst nichts******
		$write_wikicomment = $db->executeQuery("INSERT INTO wiki_comments set caid='$caid', coid='$coid', comment='$comment', created=now(), name='$name'");
		$eintragen = mysql_query($write_wikicomment);
		
}

Nun habe ich das Gritter Notification eingebaut, welches per Klick auch wunderbar funktioniert. Nun möchte ich aber, das es automatisch kommt, wenn "$eintragen" fertig ist...

Das ist die Standardfunktion, welche ich am Ende der Seite habe, kann ich die nun integrieren sodass nach dem erfolgreichen Speichern das Fenster kommt?

Code:
		$('#add-regular').click(function(){

			$.gritter.add({
				// (string | mandatory) the heading of the notification
				title: 'Pinnwandeintrag erfolgreich',
				// (string | mandatory) the text inside the notification
				text: 'Dein Eintrag auf die Pinnwand wurde erfolgreich versendet und erscheint in wenigen Sekunden auf der Pinnwand.',
				// (string | optional) the image to display on the left
				image: 'images/messageboxes/success.png',
				// (bool | optional) if you want it to fade out on its own or just sit there
				sticky: false,
				// (int | optional) the time you want it to be alive for before fading out
				time: ''
			});

			return false;

		});

Danke und Grüße

Dennis
 
Zurück