Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JQuery Ajax won't display results in Chrome
- <html>
- <head>
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- <script>
- $(document).ready(function()
- {
- $.ajax({
- type: "GET",
- url: "test.xml",
- dataType: "xml",
- success: parseXml
- });
- });
- function parseXml(xml)
- {
- $(xml).find("test").each(function()
- {
- $("#test").append("<tr><td>" + $(this).find("name").text()+"</td><td>" + $(this).find("phone").text()+"</td></tr>");
- $('#test').trigger('create');
- });
- }
- </script>
- </head>
- <body>
- <table id="test" border="1"></table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment