JavaScript passing the Value to php query
<p>this is my first post here and hopefuly someone will help me fix this problem. I have this mysql query:</p>

<pre><code>$query_history = "
            SELECT ProductProvider AS NameSS, type, StoreOpinionDate AS dating
            FROM cd_stores 
            WHERE UserFID = '".$row_Profile['UserFID']."' 

            UNION ALL

            SELECT BrandName AS NameSS, type, BrandOpinionDate AS dating 
            FROM cd_brandopinions
            WHERE UserFID = '".$row_Profile['UserFID']."'

            UNION ALL

            SELECT CommentTitle AS NameSS, type, CommentDate AS dating 
            from cd_comments
            WHERE UserFID = '".$row_Profile['UserFID']."'

            UNION ALL

            SELECT brands.ProductBrand AS NameSS, type, date AS dating 
                from brandtrack INNER JOIN brands 
            WHERE UserFID = '".$row_Profile['UserFID']."' and brandtrack.BrandID = brands.BrandID

            ORDER BY dating DESC
            LIMIT 9
";
</code></pre>

<p>and follwing javascript:</p>

<pre><code>&lt;script type="text/javascript" src="../admin/config/js/jquery/jquery-1.3.2.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(document).ready(function(){
            $("#loadmorebutton").click(function (){
                $('#loadmorebutton').html('&lt;img src="facebook_style_loader.gif" /&gt;');
                $.ajax({
                    url: "facebook_style_ajax_more.php?lastid=" + $(".postitem:last").attr("dating"),
                    success: function(html){
                        if(html){
                            $("#postswrapper").append(html);
                            $('#loadmorebutton').html('Load More');
                        }else{
                            $('#loadmorebutton').replaceWith('&lt;center&gt;No more posts to show.&lt;/center&gt;');
                        }
                    }
                });
            });
        });
    &lt;/script&gt;
</code></pre>

<p>now the problem is that when I inside form press submit button the Value "dating" from mysql query is not passed on acebook_style_ajax_more.php page using above JavaScript and Im getting empty value passed. What I need to change inside JS code to make it work?</p>

<p>Thanks</p>
