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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:43:15+00:00 2026-06-12T11:43:15+00:00

I have added the settings to my javascript file using this: drupal_add_js(array(‘xc’ => array(‘unit_descriptions’

  • 0

I have added the settings to my javascript file using this:

drupal_add_js(array('xc' => array('unit_descriptions' => $descriptions)), 'setting');
drupal_add_js(array('xc' => array('unit_names' => $units)), 'setting');

And it works fine when loading the .js file using:

$unitName.text(Drupal.settings.xc.unit_names[utid]);
$unitDesc.text(Drupal.settings.xc.unit_descriptions[utid]);

In order to load the values.
But when validation fails, e.g: if I dont specify a name or whatever, these two arrays disappears and I get the statement in the console:

Drupal.settings.xc is undefined

How can I reload these arrays, or prevent the on validation fail to remove the arrays.
Please, any help is appreciated.

Kind regards!

  • 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-12T11:43:17+00:00Added an answer on June 12, 2026 at 11:43 am

    I solved it, in the validate function I just checked for any errors, and if an error exists, I just add the js files again.

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

Sidebar

Related Questions

I have added some settings to my c# application using the configuration editor. There
I have an MVC4 web application In setting it up on IIS7.5 I added
I have added an HTML file to my solution in VS2010. How do you
I have added an extra field Specification in Catalog->Product->Data tab. This text is stored
I have added an external .exe file into my VS2010 setup project and I'd
I have added some javascript in html page for input validation.same page is working
I have an IOS5 project. I have added a settings bundle to my project
I am (slowly) making the switch to vim. I have added some settings to
I have registered javascript under portal_javascript using the answer 1 from How to Disable
I have the following javascript code: var editor = new tinymce.Editor(id, settings); On window

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.