Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm creating a project management site for myself that contains multiple lists inside lists. I'm trying to use jquery to append a php file onto the index.php from multiple links.

<a href="list_a.php?parent_id=101&child_id=101" id="col_1">Build Widgets</a> <br>
<a href="list_a.php?parent_id=101&child_id=102" id="col_2">Market Product</a> <br>
<a href="list_a.php?parent_id=101&child_id=103" id="col_3">Expansion</a>

I can append one php file without passing the variables to jquery/ajax using the code below, but I need to figure out how to pass the variables onto the appended list so that my php knows what to grab from the mysql database and display. Each list will be unique and added to frequently.

$(document).ready(function() {
    $('#col_1').click(function(){
        $.ajax({
            url: 'array-2.php'
        }).done(function(data) {
            $('body').append(data);
        });
    });
});

Each append should bring up another list of links that should be able to do the same appending. You can see an Example of what I'm trying to do, only I used php and iFrames to develop it so i didnt have to refresh the page. Any ideas? Or at least a direction I should look towards? Any help would be greatly appreciated, because I'm lost. thanks.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.