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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:05:59+00:00 2026-06-08T11:05:59+00:00

My question is this, if I have a page say index.HTML that has some

  • 0

My question is this, if I have a page say index.HTML that has some script in, something simple like…

<script type="text/JavaScript">
$(document).ready(function() {
    Var buttonBox = {};
})
</script>

Obviously there would need to be more, I’m trying to make this simple.
Then I use ajax to retrieve some data from the db and fill in the contents of a div, but in my return page I have another script tag, something like…

<script type="text/JavaScript">
$(function() {
    buttonBox.start = "some variable or string";
})
</script>

Along with the HTML content. Why is buttonBox.start not available in the main index.HTML page? Is there a way to make it available? Is formatting the output of my server page as a huge json object then parsing through it to set every needed variable along with the HTML content the best/only way to achieve this?

Thank you for the help, if you need more info I’ll be happy to provide it, I was just minifying this for sake of ease.

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

    you could add the buttonBox to the window and make it global:

    $(document).ready(function() {
         window.buttonBox = {};
    });
    
    $(function() {
        window.buttonBox.start = "some variable or string";
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a web page ( /index.html ) that contains the following
I have a simple question. Let's say that I have this in robots.txt: User-agent:
Okay this question is very simple: I have a facebook page, and a website.
Weird question this, going round in circles. I have 2 pages. Page 1. Has
I have to create a web page that for the purposes of this question
This may sound a weird question, I have a page which has a link:
I have a feeling that this is a subjective question, but perhaps there's something
My question is, I have a page say view.gsp and containing a form that
I have few question in this regard When you create an internet page, does
Ok, so this question probably isn't Silverlight specific. I have a silverlight 2 page

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.