[jQuery] Re: Replacing text based on language selection
Well right now my only problem is that the above Jquery code example in my original post, does not work in Internet Explorer 7. It does re-write the entire page in Japanese (good enough for my demo, later I will use a database) in FireFox browser. Any ideas how to update the Jquery code to work in IE? // Load XML document based on language var langSheet = "language_sheet_" + country + ".xml" $.ajax({ type: "GET", url: langSheet, dataType: "xml", // specify the return type as xml success: function(xmlDoc){ $(xmlDoc).find('subAboutLoc').each(function() { var item_text = $(this).text(); $('#subAboutLoc').text(item_text); }); } });
[jQuery] Re: Replacing text based on language selection
Do you have an example of the problem you are getting? Do you get any javascript errors? Have you ensured characters are correctly encoded? On Oct 9, 7:44 pm, Danjojo <[EMAIL PROTECTED]> wrote: > Update: I figured out it is actually working , but only in FireFox 2+ > > ANything I can do differently to adjust it to work in IE7 and IE6? We > can always fall back and demo in FireFox, but I would rather learn of > the solution. > > THanks guys. > > On Oct 9, 1:53 pm, Danjojo <[EMAIL PROTECTED]> wrote: > > > I think what I need to do will work... I just ran into a road block. > > One of my co-workers has filled out an XML sheet for me, with REAL > > japanese values i.e. > > > USロケーション > > グローバルロケーション > > 製品概要 > > 展示会 > > セミナー& トレーニング > > 就職案内 > > 財政情報 > > 会社沿革 History > > オーダートラッキング > > > My Jquery worked on a test I did for a German Sheet where I just > > changed it to read German Locations if the language_sheet_de.xml had > > been loaded because that was the value in the tag. > > > But it is NOT working and displaying it for the Japanese style sheet. > > My web page still says US Locations in that menu spot. The JQuery is: > > > // Load XML document based on language > > var langSheet = "language_sheet_" + country + ".xml" > > $.ajax({ > > type: "GET", > > url: langSheet, > > dataType: "xml", // specify the return type as xml > > success: function(xmlDoc){ > > $(xmlDoc).find('subAboutLoc').each(function(){ > > var item_text = $(this).text(); > > $('#subAboutLoc').text(item_text); > > }); > > > } > > }); > > > And at the top of the XML file is: > >
[jQuery] Re: Replacing text based on language selection
Update: I figured out it is actually working , but only in FireFox 2+ ANything I can do differently to adjust it to work in IE7 and IE6? We can always fall back and demo in FireFox, but I would rather learn of the solution. THanks guys. On Oct 9, 1:53 pm, Danjojo <[EMAIL PROTECTED]> wrote: > I think what I need to do will work... I just ran into a road block. > One of my co-workers has filled out an XML sheet for me, with REAL > japanese values i.e. > > USロケーション > グローバルロケーション > 製品概要 > 展示会 > セミナー& トレーニング > 就職案内 > 財政情報 > 会社沿革 History > オーダートラッキング > > My Jquery worked on a test I did for a German Sheet where I just > changed it to read German Locations if the language_sheet_de.xml had > been loaded because that was the value in the tag. > > But it is NOT working and displaying it for the Japanese style sheet. > My web page still says US Locations in that menu spot. The JQuery is: > > // Load XML document based on language > var langSheet = "language_sheet_" + country + ".xml" > $.ajax({ > type: "GET", > url: langSheet, > dataType: "xml", // specify the return type as xml > success: function(xmlDoc){ > $(xmlDoc).find('subAboutLoc').each(function(){ > var item_text = $(this).text(); > $('#subAboutLoc').text(item_text); > }); > > } > }); > > And at the top of the XML file is: >