Hi.. So let me explain:
I basically want so when you post a comment, (i use a js/jquery script to send string to insert.php which inserts to the database) you will receive 2+ points. Now i have done so you get +2 points, BUT i want to display a message like stackoverflow. I already know how to display a message like stackoverflow, but in somehow i need to send from insert.php(after you inserted), this:
<div id='message' onclick="closeNotice()" style="display: none;">
Hey, <b><? echo $pusername; ?></b> - You've just got +<? echo $gpm; ?> points for your comment!
<a href="#" class="close-notify" onclick="closeNotice()">X</a>
</div>
to index.php..
I was thinking of maybe coding into my current script(that are sending string to insert.php) that it should find #message and throw it in #box (div called "box" in index.php).
But how should i do this? Should i like, after you got through insert.php, then you activate a function in javascript that does:
function showmessage() {
$("#box").html(data).find("#message").fadeIn("slow")
}
and as i said you activate the script doing:
<script type="text/javascript" language="javascript">
showmessage();
</script>
after you succesfully have inserted to database and gived points to the user? Ive just tested this, and i cant get it to work. my site is integrated with sessions from the phpBB login (phpBB forum i've got), so i don't think i can use $_SESSION. And the insert.php is opened in a frame. My problem is that the action, and the displaying of the confirmation take place on different pages.