Trying to reload table using a dropdown

Trying to reload table using a dropdown

tjyoungtjyoung Posts: 24Questions: 2Answers: 0
edited October 2011 in General
I'm trying desparately to solve a challenge I'm having. I put an example of what it is here:

http://www.phonedj.ca/history.php

When the table loads it shows all the records in the callers table under an account id (hard coded in for example '4').

If you were to choose from the dropdown, one of the campaigns, ideally it would reload the datatable with just the callers from that campaign. And it would still be searchable based on that filter.

Thats it.

You can see thats not exactly working. I've included the processing script that is joining the two tables so you can see what I'm referencing as well as 2 screenshots of the tables in question.

Can anyone help? Obvious issues I know, but no idea how to correct.

Thanks tj

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Hi tj,

    I've just sent you a pm, but for anyone else interested, the answer is to use fnServerParams (be sure to use 1.8.2+, since it is a new feature in that release!) - http://datatables.net/ref#fnServerParams , and pass in the parameter that you want. In this case it can be read from the select menu with $(selector).val();

    Allan
This discussion has been closed.