> Hello,
> 
> after some research concerning javascript toolkits I decided to choose
> JQuery for my first approach to Web 2.0. But I get stuck with my very
> first tests. I just want to load some extra data into an existing page,
> but it does not work. What am I doing wrong? (the AJAX demos on jquery.com
> are working)
> 
> Here is my code (its really simple):
> 
> file: page.xhtml
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
>       <meta http-equiv="Content-Type" content="application/xhtml+xml;
> charset=UTF-8" />
>       <title>Old Title</title>
>       <script src="scripts/jquery-latest.pack.js" type="text/javascript"
> />
>       <script type="text/javascript">
>       /* <![CDATA[ */
>               $(document).ready(function() {
>                       $.get("pageinfo.xml",  function(data) {
>                               alert(data);
>                               var title = $("title", data).text();
>                               alert("Title: '" + title + "'");
>                       });
>               });
>       /* ]]> */
>       </script>
> </head>
> <body>
> </body>
> </html>
> 
> file: pageinfo.xml
> 
> <pageinfo>
>       <title>New Title</title>
> </pageinfo>
> 
> I guess this is the simplest thing, but when I start it, I get an alert
> with the content of the "pageinfo.xml" file and an alert with the title of
> the current document "Old Title".
> 
> Please help me!
> 
> Thanks,
> Harald

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to