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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:38:30+00:00 2026-06-15T18:38:30+00:00

I have following code… <script type=text/javascript> var arr= new Array(’10’); arr[0]=’Need For Guru’; arr[1]=’Qualities

  • 0

I have following code…

<script type="text/javascript">

var arr= new Array('10');


arr[0]='Need For Guru';
arr[1]='Qualities of a Guru';
arr[2]='Living Guru';
arr[3]='Who is a Satguru?';
arr[4]='Guru and Spiritual master';
arr[5]='Definition of discipleship';
arr[6]='Power of Faith';
arr[7]='Bad mouthing a Guru';
arr[8]='Fake Guru Shishya';
arr[9]='Pitfalls in the path of liberation';


var text='['+arr[0]+',\''+arr[1]+'\','+arr[2]+',\''+arr[3]+'\','+arr[4]+',\''+arr[5]+'\','+arr[6]+',\''+arr[7]+'\','+arr[8]+',\''+arr[9]+'\']';
document.write(text);

activatables('section', text );

</script>

My problem is that I want to use value of text as part of javascript code in line —
activatables('section', text ); .. so that code becomes like below

    activatables('section', ['Need For Guru','Qualities of a Guru',...]);

But I am not able to do the same.. .can anyone help in this?

  • 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-15T18:38:31+00:00Added an answer on June 15, 2026 at 6:38 pm

    I think I understand what you are getting at… Do you want to serialize the array as text, and deserialize text into a new array?

    To turn it into a string…

    var arr = ["Need for a Guru", "Qualities of a Guru" /*, etc... */ ];
    var text = JSON.stringify(arr);
    

    To turn the string into an array…

    var text = '["Need for a Guru", "Qualities of a Guru"]';
    var arr = JSON.parse(text);
    activatables('section', arr);
    

    Obviously you don’t need to deserialize / parse the text if you already have access to the source variable… You can just plug it straight in.

    var arr = ["Need for a Guru", "Qualities of a Guru" /*, etc... */ ];
    activatables('section', arr);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code function Model(onChanged) { this.array = new Array(); this.onChanged = onChanged;
I have following code snipped: ... var tpc = new ThirtPartyClass(); tpc.ExecuteCommand(); tpc.ExecuteCommand(); ...
I have following code var res = from c in model.Data select new object[]
I have following code: div.accountPage div.acct-form.login div.acct-header Log-in form.loginForm.login input(id=username, type=text, name=User, placeholder=Username, value=)
I have following code. ASPX Page <a href=AnyASPXPageOfWebsite.aspx onclick=javascript:CallJQuery(); > Set Price </a> JS
I have following code in C# PasswordDeriveBytes DerivedPassword = new PasswordDeriveBytes(Password, SaltValueBytes, HashAlgorithm, PasswordIterations);
I have following code in C# PasswordDeriveBytes DerivedPassword = new PasswordDeriveBytes(Password, SaltValueBytes, HashAlgorithm, PasswordIterations);
i have following code to get center of width function alertSize() { var myWidth
I have following code: <?php $select_options = array(); foreach($delivery_options as $option) { $select_options[$option->getDeviceId()] =
I have following code: my $coderef = ${MyModule::MyTool->new}; but when I try $coderef->(); i

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.