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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:48:42+00:00 2026-05-17T21:48:42+00:00

Update : This works in firefox, but does not work on chrome 6, still

  • 0

Update: This works in firefox, but does not work on chrome 6, still investigating.

I’m taking an internet programming class and learning various javascript frameworks. I’m working on a mootools problem, and the .get(‘text’) method does not appear to be working as expected on responseXML.

Here’s the responseXML:

<?xml version="1.0" encoding="UTF-8"?> 
<users> 
        <user> 
            <username>etomai</username> 
            <first_name>Joe</first_name> 
            <last_name>Smith</last_name> 
        </user> 
        <user> 
            <username>hehhh</username> 
            <first_name>hee</first_name> 
            <last_name>lkii</last_name> 
        </user> 
</users>

Here’s the code:

function update_list() {
    var req = new Request({
        url: 'users.php',
        method: 'get',
        data: {
            'term': $('search').value
        },
        onComplete: function(responseText, responseXML){
            $('list').empty();
            responseXML.documentElement.getElements('user').each(function(user){
                //this seems like it should work according to all mootools docs, but it doesn't.  user.getElement('username').get('tag') works, but neither 'html' or 'text' work...retuturning undefineds.
                console.log(user.getElement('username').get('text'));
                var copy = $('template').clone();
                $('list').grab(copy);
                $(copy).removeClass('hidden');
                $(copy).getChildren()[0].set("text", "username goes here")
                $(copy).getChildren()[1].set("text", "name goes here")
            })

        }
    }).send();

}

As indicated in the comment, on the line console.log(... I should (according to documentation) be able to get the text contained in the username tag with .get('text'). Instead, its returning undefined.

Checking the value of user.getElement('username') returns the expected

<username>etomai</username>

Running code located here

Try entering the letter “e” in the search field.

I’m stuck at this juncture. Anyone able to point me in the right direction?

  • 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-17T21:48:43+00:00Added an answer on May 17, 2026 at 9:48 pm

    Seems like a bug to me. On Firefox, "text" resolves to use the textContent property which is standard for an Element.

    On Chrome, however, it resolves to innerText since it supports it for HTML DOM, but not for XML DOM. But we’re trying to use it on an XML DOM here.

    One workaround that should work for both browsers is,

    user.getElement('username').textContent
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following attempt works in IE8 but not in Firefox (cannot use JQuery for
I faced this strange situation where foreach like construct of javascript does not work
Duplicate of this question . update - This is not an exact duplicate. See
I have a jQuery script that works perfectly fine in Chrome 11 and Firefox
Update: This turned into a blog post, with updated links and code, over at
Update: this question, including the title, was rephrased, see history for details I know
How do you update this? I've never seen any current team that actually checks
Update: Check out this follow-up question: Gem Update on Windows - is it broken?
Update: Please read this question in the context of design principles, elegance, expression of
Update: looks like this is indeed a WiX limitation - Cannot add 64bit com+

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.