do_shortcode with ajax method
-
hi
i’m loaded businessdirectiry plugins with the codex function do_shortcode in my wordpress page like this :<?php echo do_shortcode('[businessdirectory]'); ?>
it run very well!
now i want to call it from a php page, map.php :<?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"); xhr_object.open("GET", "https://localhost/test/map.php", false); xhr_object.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8"); xhr_object.send(null); document.getElementById('result').innerHTML = xhr_object.responseText; } </script> <form method="post" action="javascript:reload()" > <input type="submit" name="btok" id="btok" value="OK" > </form> <div id='result'></div>
but nothing appending ! the div tag is empty !
have you another solutionthanks
- The topic ‘do_shortcode with ajax method’ is closed to new replies.