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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:18:17+00:00 2026-05-25T11:18:17+00:00

I have a google map where user places markers at various locations. I show

  • 0

I have a google map where user places markers at various locations. I show a jquery dialog on click event which has a form, where user will fill other details pertaining to the marker.
Now i need to make this data persist:

1] I need to store the markers ( along with the details ) to a hidden field of a form, so my server can parse it and populate the database. Something on the line of:

markerData = JSON.stringify($('#dialog' + markerId).serializeObject()); // the form
.. add the markerData with key as markerId to a global javascript variable ..
$('#markersList').val( JSON.stringify("the global var"));

Note:
$('#dialog' + markerId) will uniquely identify the markers dialog(which has the form)

2] I need to retrieve the values from the database and form the string that will be placed in the hidden field. This is required for the edit/view page.

Basically i need a datastructure(key/value) in javascript where markerId is the key and the form elements are the values, AND i need a way to convert all the values in a format parsable by server (via hidden field) and vice versa.

  • 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-25T11:18:17+00:00Added an answer on May 25, 2026 at 11:18 am

    What about:

    var keyValuePairs = [{ "key1": "value1" }, { "keyN": "valueN" }];
    alert(keyValuePairs["key1"]);
    

    Or just:

    var keyValuePairs = {};
    keyValuePairs["key1"] = "value1";
    keyValueParis["keyN"] = "value2";
    alert(keyValuePairs["key1"]);
    

    UPDATE:
    If you want to post this associative array as JSON in a hidden field, just stringify the array with the JSON library of your choice and set JSON text to the whole hidden field.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Google Map on the webpage with markers on it that has
I have a Google V3 map which uses steetView and some map markers. The
I have a Google Map on our site that has a list of markers
i have google Maps and when the user touch any point in the map
I have an App which launches the google Map App. The code is: UIApplication
I have an app that saves google map markers, I basically save the lat
I have an application based on google map, in which I need to use
I have google maps embedded in my website. Its has markers and when clicked,
I have a Google map that is showing a number of markers. When the
I have a website where people can view some places on a google map,

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.