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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:38:01+00:00 2026-05-13T23:38:01+00:00

In the main gadget html, there is a div with an onclick that calls

  • 0

In the main gadget html, there is a div with an onclick that calls this method in the Gadget script file:

ShowFlyout = function() 
{
    System.Gadget.Flyout.show = true;
    var flyoutDoc = System.Gadget.Flyout.document;
    var mainFlyoutDiv = flyoutDoc.getElementById('divFlyout');
    mainFlyoutDiv.innerHTML = "hello";
}

Here is the Flyout html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>This is a flyout</title>
    <link href="Css\FlyoutStyle.css" type="text/css" rel="Stylesheet" />
</head>
<body>
    <div id="divFlyout" >
    </div>
</body>
</html>

The problem is that mainFlyoutDiv is always null. When peering into the System.Gadget.Flyout.document object through the debugger, the body parameter is null – I don’t think that’s right. The System.Gadget.Flyout.file value is being set elsewhere when the gadget first loads.

What am I doing wrong?

Also, does the System.Gadget.Flyout.show property have to be true before the System.Gadget.Flyout.document property can be accessed? My ultimate goal is to open a flyout and dynamically populate it’s html

  • 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-05-13T23:38:01+00:00Added an answer on May 13, 2026 at 11:38 pm

    The problem here is the flyout is loaded asynchronously (because it’s an entirely new window). The line

    var mainFlyoutDiv = flyoutDoc.getElementById('divFlyout'); 
    

    is executed before the Flyout document is finished being parsed, which is why it’s null – the element doesn’t exist yet. There’s a couple of options available to you, my favourite being something like this:

    ShowFlyout = function()    
    {   
        System.Gadget.Flyout.show = true;   
        var flyoutWin = System.Gadget.Flyout.document.parentWindow;   
        flyoutWin.myCustomVar = "Hello";
    }
    

    And in your flyout HTML, add a script with the following code:

    window.onload = function ()
    {
        document.getElementById("divFlyout").innerHTML = myCustomVar;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Main article there is a header file and a source file . After copying
main.php: <SCRIPT type=text/javascript> $(#btnSubmit).click(function () { alert(What will i put here!); }); </SCRIPT> <input
main() calls Call_By_Test() function with argument parameter First Node. I have freed the First
Main question is what are the implications of allowing the this keyword to be
main.php files has: $randnum=rand(100,500); echo ' <form name=form1 id=form1 action=my.php method=post> <input type=text name=A'.$randnum.'
Main question: I have a Form that is MDI container and placed a Splitter.
main method: public static void main(String[] args) throws Exception { if (args.length != EXPECTED_NUMBER_OF_ARGUMENTS)
The main window of my iOS application contains a UITabBarController. There're 3 UITabBarItem and
'Main.mainClass' does not contain a definition for 'myMethod' and no extension method 'myMethod' accepting
Main concern is that it can happen at the moment of application crash. How

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.