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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:47:36+00:00 2026-06-07T08:47:36+00:00

I have a problem with my JavaScript code. I’m starting with some more complex

  • 0

I have a problem with my JavaScript code. I’m starting with some more complex things right now, seemed to find some answers on the net, but unfortunately I can’t get it fixed. The problem is:

I want the variables sGetMobileField and ValMob to get in the parameters, but like this it isn’t working:

var oFieldValues = { sGetMobileField:) { Value: ValMob } };

Variables don’t seem to work as a object property. Anybody can help me fix it?

Thanks,
Dane

  • 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-07T08:47:38+00:00Added an answer on June 7, 2026 at 8:47 am

    Try this

    var oFieldValues = { };
    oFieldValues[ sGetMobileField ] = { Value: ValMob };
    

    You can use variables as property identifiers, but not inside an object literal. You have to create the object first, and may then add dynamic properties using

    obj[ varToHoldPropertyName ] = someValue;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im doing some javascript code and im using firefox. i have a problem which
I have problem with javascript code. I am using google maps and I am
I have a problem with JavaScript magic. When I execute this code: var page
I have a very simple JavaScript/jquery code which won't just work correctly. The problem
I have this html code <html> <head> <title>JQuery Problem 2</title> <script type=text/javascript src=jquery-1.4.min.js></script> <script
I have one problem with Javascript Nodes.I want to find out what button was
I have this regex/javascript code: toReturn = toReturn.replace(/(\[url=)(.+)(\])(.+)(\[\/url\])/g, '<a target=\_blank\ href=\$2>\$4</a>'); But the problem
I have some JavaScript code and a button which already has an event/action assigned
I'm building a jquery mobile site and I'm have some problem with javascript.if the
I'm struggling with some JavaScript code that I have used countless times across my

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.