Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery .load section of a page after scripts on that page have finished

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #167942
    just.another.mike
    Participant

    I have a wordpress site. On this site I have a directory that uses datatables.js.
    http://example.com/directory/

    I have added a querystring filter to the directory so that I can load a pre-filtered view of the directory.
    http://example.com/directory/?search=query

    I have another page on the site that includes the #directory table into a #results div. That is working, but what I would really like to do is be able to include a filtered table into the #results div such that going to http://example.com/department1 would show in the #results div the results of http://example.com/directory/?search=department1.

    It seems the .load include is fetching the #directory table before it is filtered.

    Is there a way to have the .load include the filtered table instead of including the non-filtered table?

    I have tried to illustrate the code with these examples:
    source page with datatables.js table – the url is codepen.io slash anon/pen/rlaDj/
    http://codepen.io/anon/pen/rlaDj/

    destination page with jQuery .load to pull filtered table – the url is codepen.io slash anon/pen/FLHDt/
    http://codepen.io/anon/pen/FLHDt/

    I am not a complete newbie to jQuery but I’m far from advanced. Is there a way to make this work?

    Thanks!
    Mike

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.