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

  • Home
  • SEARCH
  • 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 8706325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:35:18+00:00 2026-06-13T03:35:18+00:00

I have a small function that takes a dynamic list of textboxes with urls

  • 0

I have a small function that takes a dynamic list of textboxes with urls and sends it to the server. I am trying to load the urls into an array then pass them off in a JSON object. The problem is, when I get to that point in the code, I keep getting the error:

TypeError: url_data[this_url] is undefined
http://localhost/2011/admin/public/assets/js/tssol.ui.js
Line 196

Here is the block that returns that error:

$("#dialogEditor").dialog('option', 'buttons', {'Save' : function() {
    /* Define variables */
    var url_data = new Array();
    var this_url = 0;

    /* I've tried this with and without explicitly passing the vars... */
    $("#website_editor input").each(function(url_data, this_url) {
        var id =$(this).attr('name').match(/\d+/);
        var url=$(this).val();

        /* Test the varible each iteration */
        console.log("this_url: " + this_url + " id: " + id + " url: " + url);

    /* Line 196 */ url_data[this_url].id = id;
        url_data[this_url].url = url;

        this_url++;
});


data = JSON.stringify(url_data);
//data = url_data;
//console.log(data);

$.ajax({
    url: 'ajax.websites.php',
    dataType: 'json',
    data: {
        action: "update_resort",
        ResortId: resort,
        data: data
    }
});

$(this).dialog("close");
},
'Cancel': function(){$(this).dialog("close");
}});
},

Sorry about the formatting

  • 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-06-13T03:35:19+00:00Added an answer on June 13, 2026 at 3:35 am

    I would do this:

    url_data[this_url] = {
        id: id,
        url: url
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small C# function that takes any generic SQLDataReader and converts it
I have an expensive function that takes and returns a small amount of data
Im have written a small function that basically takes the currentPosition value as a
I have a small function (below) that takes a parameter to determine what to
I'm trying to write a small function that takes in a filepath (where the
i have small function that running on condintion, if text box value is not
In an access database I have a small function that is called on startup
I have functions that contribute to small parts of a figure generation. I'm trying
Let's say you have a small calculator program that takes numbers and an operator
I have a small program that takes input in the form of ascii characters.

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.