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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:06:08+00:00 2026-06-07T11:06:08+00:00

This is the code: (function(Info, undefined) { var createInfoTableForFeature = function (obj) { var

  • 0

This is the code:

(function(Info, undefined) {
    var createInfoTableForFeature = function (obj) {
        var data2form = {};
        data2form.name = obj.name;
        data2form.state = obj.state;
        data2form.stateid=obj.stateId;
        data2form.city = obj.city;
        data2form.cityId=obj.cityId;
        data2form.sector = obj.sector;
        data2form.sectorId=obj.sectorId;
        data2form.municipality = obj.municipality;
        data2form.municipalityId=obj.municipalityId;
        data2form.parish = obj.parish;
        data2form.parishId = obj.parishId; 
        data2form.postcode = obj.postcode;
    }
    Info.copy2form = function(data){
        console.log(data);
    }
})(window.Info = window.Info || {});

When I call Info.copy2form(data2form), data2form is undefined

  • 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-07T11:06:09+00:00Added an answer on June 7, 2026 at 11:06 am

    You want data2form to be global, then you’ll have to remove de var keyword before the declaration of the variable data2form to make it global.

    If you want to make it accesible from everywhere but within Info container, then you can declare it like this:

    Info.data2form = {};
    

    and then call your function like this:

    Info.copy2form(Info.data2form)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: $('.user_info').click(function(){ var pos = $(this).offset(); rel_value = $(this).attr('rel'); $('#' +
I have got this code: function init(){ if (typeof window.jQuery !== 'function') { var
I have this code: function submitTwice(f){ f.action = 'http://mydomain.com/threevideopage.php'; f.target='name'; f.submit(); } I left
I got this code: function zeroPad(num, places) { var zero = places - num.toString().length
Hello I get a weird error in this code: function validateForm(aform) { var s=;
So I have this code which is called in a print_info() function after a
So, I have this simple code $('#info_name'+index).show(slide, {direction: right}, 1000, function(){ $('#info_info'+index).show('slide',{direction: up}, 1000);
This is my code currently: $(function() { $('#header_left').click(function(){ $('#header_left_info').fadeOut('fast'); $('#header_left').fadeOut('fast'); $('#header_left_back').delay(250).fadeIn('fast'); }); }); (the
With this code function someFunction(classParam:Class):Boolean { // how to know if classParam implements some
I have this code: function Keyboard() { this.log = $('#log')[0]; this.pressedKeys = []; this.bindUpKeys

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.