Create a ColdFusion request javascript array for use with ajax function

I am building a page that displays the projects of my clients. In the database, each project record has a logical flag indicating which category and class the projects belong to.

Categories of projects; planning, landscape, environmental. And classes; industrial, government, education, residential.

When a user wants to see "planning" projects for an "industrial" application, I query the database accordingly using the URL parameters when loading the page:

SELECT project_id, name, location, description, planning, landscape
      , environment, industrial, government, education, residential 
FROM   projects 
WHERE  planning = 1 and 
       industrial = 1 

.. and display the first project in the result set on the page.

Here where i need help

. , /, , " - . ", planning, industrial. ajax , .load() .ajax(). , , ajax ?

javascript/jQuery ajax - . , .

+5
1

, . :

<a data-project="#project_id#">#name#</a>

, :

$("a").click(function(e) {
    e.preventDefault();
    var project_id = $(this).data("project");
    // You could load in your new data here
});
+1

All Articles