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

The Archive Base Latest Questions

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

This is my first JQuery experience and I’m on quite a tight deadline. It’s

  • 0

This is my first JQuery experience and I’m on quite a tight deadline. It’s a bit of an embarrassing question, but here goes. I’m calling a web service that returns a list of strings (which works and returns OK). Code is below

$(document).ready(
    function() 
    {
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "CatList.asmx/GetCatergoies",
            data: "{}",
            dataType: "json",
            success: onActionCompleted
        });
    }
)

function onActionCompleted(data) {

    var resultData = data['d'];
    alert(resultData);
 }

The alert produces a comma seperate string of the results from the web service. I can’t figure out for the life of me how I can iterate through the results. When I do something like this:

resultData.each(
   alert(this)
)

All I get in Firebug is this error:

resultData.each is not a function

Any pointers ?

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

    Thanks! I wouldn’t have been able to solve it without the feedback. I’m still not completely sure what format resultData is. I did some copy and paste on the code so not sure what data[‘d’] converts the list into in json terms.

    When I tried the split on resultdata I got this error in Firebug:

    resultData.split is not a function

    In the end I just used the $.each() on resultdata without the split and it worked.

    function onActionCompleted(data) {
    
        var resultData = data['d'];
        $.each(resultData, function() {
            alert(this)
        })
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a very mundane question, but this is the first jQuery plugin
I know there exists a command like jQuery.noConflict. But for this it first registers
I warn you now very little experience at jquery. My question is this. I
This looks very simple but I have little experience with jQuery and I can't
This is my first usage of jQuery. I just want a quick solution for
With jquery, I'm dynamically adding rows. To do this, I'm copying the first of
This first bit works: $my_id = 617; $post_id_7 = get_post($my_id); $title = $post_id_7->post_excerpt; echo
My first delve into working with JSON data. I have a bit of experience
I'm a beginner jquery user so I'm really hoping this will be quite straight
I'm trying to make a mobile application using jQuery Mobile and Phonegap. But first

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.