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 6341455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:02:18+00:00 2026-05-24T20:02:18+00:00

In the following code, I included an attribute for debugging. In FF and Chrome,

  • 0

In the following code, I included an attribute for debugging. In FF and Chrome, I get a ton of alerts saying “attribute found”, but in IE, I get nothing. The function returns an empty array.

I have also tried removing the console.info(this) line.

BTW, I’m using SPServices to access lists from SharePoint 2010 — I’m trying to get all the columns of a list.

/*!
 * listAttributes jQuery Plugin v1.1.0
 *
 * Copyright 2010, Michael Riddle
 * Licensed under the MIT
 * http://jquery.org/license
 *
 * Date: Sun Mar 28 05:49:39 2010 -0900
 */

 //THIS ISN'T WORKING IN IE
if(jQuery) {
    jQuery(document).ready(function() {
        jQuery.fn.listAttributes = function(prefix) {
            var list = [];
            var attributes = [];
            $(this).each(function() {
                console.info(this);
                for(var key in this.attributes) {
                alert("attribute found");
                    if(!isNaN(key)) {
                        if(!prefix || this.attributes[key].name.substr(0,prefix.length) == prefix) {
                            attributes.push(this.attributes[key].name);
                        }
                    }
                }
                list.push(attributes);
            });
            return attributes;
        }
    });
}
//end listAttributes Plugin - use this to see what attributes 


function ImportSPListColumnsToArray(ListName)
{
    var ArrayForStorage = new Array();
$(document).ready(function() {


  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: ListName,
    CAMLViewFields: "",
    CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll'/></QueryOptions>",
    **completefunc: function (xData, Status) {
      $(xData.responseXML).find("[nodeName='z:row']").each(function() {
      //find all fields used by each row and aggregate them without duplicating
      var row_attr = $(this).listAttributes();**
      for (var i=0; i<row_attr.length; i++)
        {
            if ($.inArray(ArrayForStorage, row_attr[i]) == -1)
                {
                    ArrayForStorage.push(row_attr[i]);
                }
        }
      row_attr.clear();
      });
    }
  });

});
  return ArrayForStorage;

}
  • 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-24T20:02:19+00:00Added an answer on May 24, 2026 at 8:02 pm

    Figured it out.

    IE apparently doesn’t recognize this.attributes as having a length in the for each loop.

    So I just iterated through them, and it worked.

    if(jQuery) {
            jQuery.fn.listAttributes = function() {
                var attributes = new Array();
                $(this).each(function() {
                    for (var i=0; i<this.attributes.length; i++)
                    {
                        attributes.push(this.attributes.item(i).nodeName);
                    }
                });
                return attributes;
            }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm writing some XML generating code, and found that the following attribute value
The following code does not want to compile. See the included error message. Code:
An answer to one of my questions included the following line of code: label
The following code works, but can you tell me if this is the right
When I run the following code to add an element with an attribute it
i have the following code: #include <stdio.h> int main(void) { float a[4] __attribute__((aligned(0x1000))) =
The following code #include <iostream> using namespace std; int main() { const char* const
The following code #include <stdio.h> template <typename T, T v> class Tem { T
Test the following code: #include <stdio.h> #include <stdlib.h> main() { const char *yytext=0; const
Consider the following code: #include <stdio.h> namespace Foo { template <typename T> void foo(T

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.