i need urgent help..
iam working on leave management system(LMS).if the employee apply for the leaves means,one message go to HR inbox (internal application inbox).
iam designing inbox for this..it has two parts(2 coloums).in the first coloumn iam displaying messages with employe name,id nd subject(just like preview of the message)..iam retriving employee name and id,and subject from the database.if the HR click on the particular messages,that message whole content should display in the second coloumn.it should be dynamic.
any idea,any help?how to achive this??

Recommended Answers

All 4 Replies

If you are only pulling through the name and subject initially (and ID presumably) then when the preview is clicked on you do another database query to get the rest of the message information using the ID as the identifier. And then display that in the seond area in pretty much the same way you displayed the preview.

my problem is how to pass jS variable from .js file to .php file.
means if i click on the preveiew of message, the message id is storing in external jS file

  $( ".sender" ).on("click",function()
    var test=(($("input[name=sender]").val()));
    var id=$(this).parent().attr('id');

now i want to send that variable id to .php file
( if i click on the preveiew of message,respective content should be display on the right side)

Look into jquery http.post method. It lets you make an AJAX call to a URL you specify and pass in data.
The PHP script reads in the $_POST variables and you're all set to do your database query

Any help?


$( ".sender" ).on("click",function()
        var test=(($("input[name=sender]").val()));
        var id=$(this).parent().attr('id');
    alert(id);//its working fine ,iam getting the id here

                        url: "inbox.php",


                        success: function(data){





<?php $msg_id=$_POST['msg_id'];

iam not getting the $msg_id ,
getting 404 server response error

any help??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.