Support » Plugins » do_shortcode with ajax method

  • hi
    i’m loaded businessdirectiry plugins with the codex function do_shortcode in my wordpress page like this :

    echo do_shortcode('[businessdirectory]');

    it run very well!
    now i want to call it from a php page, map.php :

    echo do_shortcode('[businessdirectory]');

    the map.php file is loaded when clicking on an input button on my wordpress page like this :

    <script type="javascript">
    function reload()
    var xhr_object = new XMLHttpRequest();
    xhr_object = new ActiveXObject("Msxml2.XMLHTTP");"GET", "http://localhost/test/map.php", false);
    xhr_object.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");
    document.getElementById('result').innerHTML = xhr_object.responseText;
    <form method="post" action="javascript:reload()" >
    <input type="submit" name="btok" id="btok" value="OK" >
    <div id='result'></div>

    but nothing appending ! the div tag is empty !
    have you another solution


  • The topic ‘do_shortcode with ajax method’ is closed to new replies.