example please: server-side post with parameters, using triggers on page

example please: server-side post with parameters, using triggers on page

dt97dt97 Posts: 5Questions: 0Answers: 0
edited November 2009 in General
Hello,
I am stuck and hope someone can help me out..

I need a working example that shows when you click one of mulitple divs or select a drop down box value, a post with parameters is made to the Ajaxdatasource, and the shows results in the data table on the page.

I can make the examples work that are in the .ready and .function sections as a "one time" event. But when I try to trigger an event later, I cannot get the otable.fnDraw to do anything.

You have a great tool here and its going to completely change my programming career!! Great job!!

Replies

  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    HI dt97,

    Perhaps if you could post some of your code (or even better - a link), that would help us to answer your question. If you have assigned otable correctly, and the scoping is all okay, then there shouldn't be a problem with calling otable.fnDraw() - but without seeing what is going on, it's a little hard to diagnose.

    Regards,
    Allan
  • dt97dt97 Posts: 5Questions: 0Answers: 0
    Hi allan,
    I was hoping someone had a ready made example and I could apply it to what I got. I am doing asp with an acc97 db. And don't have an external sandbox to set it up in.

    I don't have any problems running all these examples from .ready. But I can't get it to work dynamically.

    Has anyone seen where you hard code a variable and works, but when the variable is set while processing , it doesn't ?? I even do an alert on the variable and the value is set?? Weird..

    Thanks
  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    Hi dt97,

    When you say the variable is set during processing - do you mean:

    [code]
    $(document).ready( function () {
    var oTable = $('#example').dataTable();
    } );
    [/code]
    kind of thing? If so, oTable only exists in the scope of the ready function. To make it globally available you need to make it a global variable. I don't think there any any server-side specific examples of this, but there are certainly some of the others which use a global reference variable.

    Regards,
    Allan
  • dt97dt97 Posts: 5Questions: 0Answers: 0
    Thanks Allan for replying back..

    I will try to set up a PHP\Mysql example so you can get a better insight into what is happening to better help me... And hopefully a lot of others with similar issue\request..

    You have a great plug-in here.. and your support is legendary!! I am very excited becuase I see a lot of potention with this for a LOT of things I am doing.

    The few things I have used it for have been very well received..
This discussion has been closed.