Title: Running XML script in wordpress webpage
Last modified: August 21, 2016

---

# Running XML script in wordpress webpage

 *  [vojtaripa](https://wordpress.org/support/users/vojtaripa/)
 * (@vojtaripa)
 * [12 years ago](https://wordpress.org/support/topic/running-xml-script-in-wordpress-webpage/)
 * Hello, I’m trying to execute this code inside a wordpress webpage, but its not
   working. I copied and pasted this same code from my regular webpage that does
   work located at [http://www.vojtaripa.com/mytest2.html](http://www.vojtaripa.com/mytest2.html)
 * When I paste this code into my wordpress site below, the code no longer executes.
   Any ideas?
    [http://www.vojtaripa.com/testing](http://www.vojtaripa.com/testing)
 * here is the code I have for the page:
    _<script src=”[http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script><script&gt://](http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script><script&gt://)
   <![CDATA[ $(document).ready(function(){ $(‘#myTable’).click(function(){ alert(‘
   hello world’); }); }); // ]]></script> <table id=”myTable”> <tbody> <tr> <td>
   blah blah blah</td> </tr> </tbody> </table>
 * <hr />
 * <script>// <![CDATA[
    function showUser(str){if(str==””){document.getElementById(“
   txtHint”).innerHTML=””;return;}if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}
   else{xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);}xmlhttp.onreadystatechange
   =function(){if(xmlhttp.readyState==4 && xmlhttp.status==200){document.getElementById(“
   txtHint”).innerHTML=xmlhttp.responseText;}}xmlhttp.open(“GET”,”getuser.php?q=”
   +str,true);xmlhttp.send();} // ]]></script>
 * <form><select name=”users” onchange=”showUser(this.value)”><option value=””>Select
   a person:</option><option value=”vojta”>Peter Griffin</option><option value=”
   Vojta”>Lois Griffin</option><option value=”vojta ripa”>Joseph Swanson</option
   ><option value=”Ripa Vojta”>Joe MAMA</option><option value=”Vojta Ripa”>Vojta
   Ripa</option></select></form> 
    <div id=”txtHint”><b>Person info will be listed
   here.</b></div>
 * Here is another professional example of the code working…
    [http://www.w3schools.com/php/php_ajax_database.asp](http://www.w3schools.com/php/php_ajax_database.asp)

The topic ‘Running XML script in wordpress webpage’ is closed to new replies.

## Tags

 * [script](https://wordpress.org/support/topic-tag/script/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * 0 replies
 * 1 participant
 * Last reply from: [vojtaripa](https://wordpress.org/support/users/vojtaripa/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/running-xml-script-in-wordpress-webpage/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
