passing datat from one page to another using javascript
<p>function fillRoomList(){</p>

<pre><code>        var val;
        var room=&lt;?php echo $room_number; ?&gt;;
        var from=&lt;?php echo $from_date; ?&gt;;
        var to=&lt;?php echo $to_date; ?&gt;;

        var combo = document.getElementById("bldgList");
        if(combo.selectedIndex &gt;= 0){
            val = combo.options[combo.selectedIndex].value;
        }
                $.ajax({
            type: 'POST',
            url: 'http://localhost/Project/GetBuildingData1.php',
            **data: "id="+3+ " &amp;bldg_number="+val+"&amp;room_number="+room+ "&amp;from_date="+from+ "&amp;to_date="+$to,**
            async: false,               
            success:function(resp) {
                $("#roomList").html(resp);
            }   
        });
</code></pre>

<p>//<strong>data: "id="+3+ " &amp;bldg_number="+val+"&amp;room_number="+room+ "&amp;from_date="+from+ //"&amp;to_date="+$to,</strong>
in above two line i am passing  some variables but i don't know whats mistake in it i am not getting the desired output,may be i am doing some mistake in above two lines.I have noticed that when i change my above two line to
<strong>//**data: "id="+3+ " &amp;bldg_number="+val</strong> it runs successfully but i also require some other variables that are receiving on getBuildingData1.php  </p>
