Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7663423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:03:34+00:00 2026-05-31T14:03:34+00:00

I have been searching high and low on the internet for an answer to

  • 0

I have been searching high and low on the internet for an answer to this question and I think there is something I am missing. I am reading in a gallery of photos from an xml document via jquery $.ajax() and I am having trouble with IE7. The function I am using works fine in all the other browsers I’ve tested.

I have read a ton on setting the correct dataType and contentType for IE, but I’m beginning to question whether or not that is the issue. I have tried a ton of combinations of different dataTypes and contentTypes and none of them seem to do the trick. I am wondering if there may be an issue with my xml or with the way my function is reading the xml, because with the function set the way it currently is, everything runs through in IE7, but none of the images are added to the DOM.

    var dataType;
if ($.browser.msie) { dataType = 'text' } else { dataType = 'html' };

$.ajax({
   type: 'GET',
   url: 'images/gallery-images/gallery-images.xml',
   dataType: dataType,
   success: function(parseXML){

   $(parseXML).find('section').each(function(){

    var $section = $(this),
        photos = $section.find('photo'),
        photoContainer = $('<div></div>', { id : $section.attr('id'), 'class' : 'gallery-section' });

    photos.each(function(){

        var photo = $(this),
        imageurl = photo.attr('imageurl'),
        title = photo.find('title').text(),
        description = photo.find('description').html(),
        kind = photo.find('description').attr('type');
        icon = photo.find('icon').attr('source');
            iconClass = photo.find('icon').attr('class');

        var photoWrapper = $('<div class="photo"></div>'),
            imageElem = $('<img />', { 'src' : imageurl, 'class' : 'gallery-photo' }),
            photoInfo = $('<div></div>', { 'class' : 'photo-info ' + kind }),
            iconInsert = $('<img />', { 'src' : icon, 'class' : iconClass }),
            header = $('<h1></h1>', { text: title }),
            photoDescription = $('<div></div>', { html: description });

        photoInfo.append(iconInsert).append(header).append(photoDescription);    
        photoWrapper.append(imageElem).append(photoInfo);
        photoContainer.append(photoWrapper); 

    });
        $('#photo-viewer-inner').append(photoContainer);
    });
    var videos = '<div id="videos"></div>';
        $('#photo-viewer-inner').append(videos);
        $('#videos').load('images/gallery-images/videos.html #video-inner');

That is the code I am using to extract the data from my xml. Like I said, everything, including this and everything after this, seems to run fine in IE7, but the images are never loaded.

I am stumped, hoping to find some help here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:03:35+00:00Added an answer on May 31, 2026 at 2:03 pm

    There’s nothing I recognise as an IE7-snarl but here are a few suggestions:

    • Classes – Try setting classes with class="..." or .addClass('...') as opposed to a prop in a map, eg. photoInfo = $('<div class="photo-info"></div>').addClass(kind).
    • Declarations – icon and iconClass are both missing a var (the previous line ends with semicolon).
    • Duplicate ids? – Avoid a possibly duplicated id in the videos div with eg. var videos = $('<div></div>').appendTo($('#photo-viewer-inner')).load('images/gallery-images/videos.html#video-inner');. Note also I removed a space from the URL.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Been searching high and low for this: In Core Data, is there a way
I have been searching the internet for an answer on this registry search issue.
I have been searching the answer to this question for a while. It seemed
I have been searching high and low for an answer. I have read through
I have been searching the internet high and low for a simple way to
I have been searching high and low for a way to paginate an XML
I have been searching around for an answer to this but I can't seem
I have been searching high/low on the GooglePlex and here for a sample MVC3
I have been searching high and low, but I have not found a CSS3
I have been searching high and low for a solution to my problem and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.