Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Bloke

    (@bloke)

    This has to be a WordPress issue. I have copied and pasted the exact code and it won’t work in WordPress. Maybe is to do with this error.
    Call to a member function get_results() on a non-object in …..select.class.php
    $wpdb->get_results($query, ARRAY_A);

    I have declared global $wpdb and included wp-config.php and wp-load.php
    Firebug is showing the id is being posted ok.

    Thread Starter Bloke

    (@bloke)

    I changed the function ShowType()to included

    $id = $_POST[id];

    But still its not receiving the ID. Getting this warning: Notice: Undefined index: id

    Thread Starter Bloke

    (@bloke)

    Well I am stumped. I cannot get it to retrieve that ID. Its only 3 files. If anyone can copy and paste this code in WordPress and get it to work let me know. how-to-create-chained-select-with-php-and-jquery/

    Thread Starter Bloke

    (@bloke)

    I looked at some of my other scripts on my WordPress sites and saw they used jQuery(‘select…… instead of $(“select……
    So I changed all the instances of $ and still not working.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    So you don’t know whether the issue is from jQuery or PHP?

    Thread Starter Bloke

    (@bloke)

    I think it is because I was not using admin-ajax URL. I am working on adding that to get it to work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Chained select with jquery’ is closed to new replies.