In here: <div class=thumb"+nu+">
you're trying to set the variable "nu", yet, "nu" is also a part of
the variable you're trying to set.
You should add ending semi-colons ( ; ) to properly end your code,
which will reduce errors.
I think you want:

     var nu = $(this).find('nu').text();

     var html = "<div class=thumb"+nu+"><a href='http://mylink.com'
><img
src='images/"+thumb+".jpg' alt='"+alt+"' name='image"+nu+"' width=82
height=62 border=0></a></div>";

     $("#content").append(html);



On Jun 22, 9:50 pm, Lleoun <adoming...@vivocom.es> wrote:
> Dear all,
>
> The following code is working great for all browsers except for
> Internet Explorer ..
> I've been investigating and the problem seems to be the html method.
> How can I change the script for it to work in Internet Explorer also?
>
> Thanks in advance!
>
> <script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></
> script>
>    <script type="application/javascript">
>      $(function() {
>
>              $.ajax({
>                  type: "GET",
>                  url: "myxml.xml",
>                  dataType: "xml",
>                  success: function(xml) {
>                      $(xml).find('item').each(function(){
>                          var thumb = $(this).find('thumb').text()
>                          var ids = $(this).find('ids').text()
>                           var alt = $(this).find('alt').text()
>                           var nu = $(this).find('nu').text()
>
>  .html("<div class=thumb"+nu+"><a href='http://mylink.com'><img
> src='images/"+thumb+".jpg' alt='"+alt+"' name='image"+nu+"' width=82
> height=62 border=0></a></div>")
>
>                              .appendTo('#content');
>
>                      }); //close each(
>                  }
>              }); //close $.ajax(
>      }); //close $
> </script>
>
> <div id="content"></div>

Reply via email to