Hi! Thanks, but it didn't work, because I'm using a plugin to convert
a string of XML to a DOM object. When I wasn't using this plugin I
tried to call data type XML directly, but it didn't work with IE
either...



On Sep 8, 10:06 pm, Steven Yang <kenshin...@gmail.com> wrote:
> sorry i may be wrongbut until someone has a real solution
> here's something you can try
>
> 1. make your dataType -->dataType: "xml"
>
> 2. not sure if the problem still exists in IE8, but IE seems to have a
> problem determining an incoming data as XML, so make sure your server
> returns a header that tells the browser that the content-type is XML.
>
>
>
> On Wed, Sep 9, 2009 at 4:45 AM, elisa <phorte.elisapere...@gmail.com> wrote:
>
> > Hi! I'm learning JQuery, and I have a problem to solve.
>
> > This script is working fine with google and firefox, but IE 8. It does
> > nothing in IE... I don't know what I'm doing wrong, or what else I can
> > change.
>
> >  I'm using a plugin to convert a string of XML to a DOM object with
> > jQuery, it's from "http://outwestmedia.com/jquery-plugins/xmldom/";.
> > And the script should show the description of every word that was
> > clicked and have the style "palavra-chave"(in english it means
> > keyword). The description  is written in an XML file. I'll show the
> > script (please, remember that I'm a begginer, it may be a ridiculous
> > script for you):
>
> > $(document).ready(function(){
>
> > $(document.body).append("<div class=descr> </div>");
>
> >        $(function(){
>
> >        $(".palavra_chave").click(function(e){
> >        var palavra = $(this).text();
> >        var x = e.pageX;
> >        var y = e.pageY;
> >        var     posX = $(window).width()/2;
>
> >        $.ajax({
> >                   type:"GET",
> >                   url: "so_xml.xml",
> >                   dataType: "html",
> >                   contentType: "application/x-www-form-urlencoded;
> > charset=iso-8859-1",
> >                   success: function (xml) {
>
> >  $.xmlDOM(xml).find('palavras').each(function(){
>
> >                                        var texto =
> > $(this).find(palavra).text();
>
> >                                        if(x>posX)
> >                                        {
> >                                        var z = x-400;
> >                                        var y = y-100;
> >                                        $(".descr").css({"top":y, "left":z,
> > "position":"absolute", "z-
> > index":"10", "background-color":"#a2cffc"});
> >                                        $(".descr").html("<table width='200'
> > border='0' cellspacing='0'
> > cellpadding='0'><tr><td>" + texto + "</td></tr></table>");
> >                                        $(".descr").fadeIn('fast');
> >                                        $(".descr").fadeIn(z +', '+ y);
> >                                        $(".descr").hover('out',
> > function(){$(".descr").fadeOut
> > ('fast')});
> >                                        }
> >                                        else {
> >                                        var y = y-100;
> >                                        $(".descr").css({"top":y, "left":x,
> > "position":"absolute", "z-
> > index":"10" , "background-color":"#a2cffc"});
> >                                        $(".descr").html("<table width='200'
> > border='0' cellspacing='0'
> > cellpadding='0'><tr><td>" + texto + "</td></tr></table>");
> >                                        $(".descr").fadeIn('fast');
> >                                        $(".descr").fadeIn(x +', '+ y);
> >                                        $(".descr").hover('out',
> > function(){$(".descr").fadeOut
> > ('fast')});
> >                                        }
> >                                });
> >                        }
> >                 });
> >        });
> >        });
> > });

Reply via email to