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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:51:00+00:00 2026-05-26T05:51:00+00:00

This is my code i want to pass parameters to the flyout function but

  • 0

This is my code i want to pass parameters to the flyout function but it doesnt work, i remove parameters it work . is this code true?

$(document).ready(function() {
    var now = new Date();
    $.ajax({
        type: "GET",
        url: 'http://sarafandnet.com/sites.xml',
        dataType: "xml",
        success: function(xml) {
            $(xml).find('New').each(function() {
                var id = $(this).attr('id');
                var title = $(this).find('title').text();
                var date = $(this).find('date').text();
                var url = $(this).find('url').text();
                var desc = $(this).find('desc').text();

                if (now.getDate() == date) {

                    document.getElementById("td" + date).innerHTML = '<table width="16" border="0" cellspacing="0" cellpadding="0"><tr><td height="21" ><a href="javascript:void(0);" onclick="showFlyout(\'' + title + '\',\'' + desc + '\')" class="lightwindow" height="10px" title="' + title + '" caption="' + desc + '" >click</a></td></tr></table>';
                }
            });
        }
    });
});

function Init() {
    System.Gadget.Flyout.file = "flyout.html";
    // Initialize the Flyout state display.
    if (!System.Gadget.Flyout.show) {
        sFlyoutFeedback.innerText = "Flyout hidden.";
    }
}

function showFlyout(titlee, descc) {
    System.Gadget.Settings.write("title", titlee);
    System.Gadget.Settings.write("desc", descc);

    System.Gadget.Flyout.file = "flyout.html";
    System.Gadget.Flyout.show = true;

}

function showFlyout() {
    System.Gadget.Flyout.show = true;
}

function hideFlyout() {
    oGadgetDocument.getElementById("strFlyoutFeedback").innerText = "Flyout  hidden.";
    System.Gadget.Flyout.show = false;
}
  • 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-26T05:51:01+00:00Added an answer on May 26, 2026 at 5:51 am
    1. You cannot declare a function with the same name more than once; even if the functions accept different parameters.

      Your second declaration of showFlyout (accepting no parameters), is overriding the first.

      If you want this behaviour (optional parameters), you should do something like this:

      function showFlyout(titlee, descc) {
          if (arguments.length == 0) {
              System.Gadget.Flyout.show = true;
          } else {
              System.Gadget.Settings.write("title", titlee);
              System.Gadget.Settings.write("desc", descc);
      
              System.Gadget.Flyout.file = "flyout.html";
              System.Gadget.Flyout.show = true;
          }
      }
      
    2. Each time you call $(this), you’re recreating exactly the same jQuery object… cache it:

      $(xml).find('New').each(function() {
          var self = $(this); // cache this
      
          var id = self.attr('id'); // now use self instead of this
          var title = self.find('title').text();
          var date = self.find('date').text();
          var url = self.find('url').text();
          var desc = self.find('desc').text();
      
          if (now.getDate() == date) {
      
              document.getElementById("td" + date).innerHTML = '<table width="16" border="0" cellspacing="0" cellpadding="0"><tr><td height="21" ><a href="javascript:void(0);" onclick="showFlyout(\'' + title + '\',\'' + desc + '\')" class="lightwindow" height="10px" title="' + title + '" caption="' + desc + '" >click</a></td></tr></table>';
          }
      });
      
    3. The Windows Gallery is retired as of last week, so you will never be able to publish your Gadget to the official Gallery.

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

Sidebar

Related Questions

This code selects the nodes, I want to work on...: <xsl:variable name=rootTextpageNode select=$currentPage/ancestor-or-self::node [@level
Why this code don't work,when i want run this code vwd 2008 express show
I want to pass several parameters to this url and generate the map from
I want to pass several parameters, one of which is optional, to a function.
I want to create a alias method in ruby and pass parameters to this.
I have this code that I want to make point-free; (\k t -> chr
according to this code if i want to access imageView1 and imageView2 how can
I have a question concerning this code which I want to run on QNX:
I'm new to PHP and I want this code <option value= disabled=disabled>-------------</option> to be
In this particular code sample I want to reference the second overloaded method (int

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.