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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:50:23+00:00 2026-06-13T02:50:23+00:00

I have a (long) <script> element that displays a Google visualization. The code comes

  • 0

I have a (long) <script> element that displays a Google visualization. The code comes straight from Google; I have no way to change it.

I need the output of this hidden until the user clicks Show.

I had two attempts to achieve this goal:

  1. If the script tag is processed inside a hidden DOM node, it fails to display when the containing node is shown.

  2. If the script tag is dynamically inserted jQuery('#parent-element').html('<script...>'); then it fails because it requires document.write which cannot run asynchronously (no way to tell where in the document to write it)

The reason I need the show/hide buttons is because the output is displayed in a full-screen overlay (it is too big for the normal content area).

I would like a solution that works generically so my client can embed other “magic” html chunks provided by external SAAS (google, youtube, …)

  • 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-13T02:50:24+00:00Added an answer on June 13, 2026 at 2:50 am

    instead of display:none use a invisible element (visibility:hidden).

    display:none means that the element is not rendered as part of the DOM.
    it is not loaded until the display property changes to something else.

    visibility:hidden loads the element, but does not show it.

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

Sidebar

Related Questions

I have a script that adds all children from the current clicked element to
With my database upgrade scripts, I typically just have one long script that makes
I have a script that is taking too long to run and I have
I have a VBA script that inserts long strings into Excel cells. In some
I have complex code blocks, in a Matlab script, that act on large, non-sparse
I have a long-ish script to do some data analysis, and it has to
I have long cycles of GC. from checks I saw there are too many
Apple have long blocked mobile Safari from playing sounds – the usual JavaScript commands
I have found a script that adds mouse trail on Opera's mouse gesture. Very
I currently have this huge and slow code that takes forever to run.... Im

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.