Sidebar gadget development tutorial (4)

Source: Internet
Author: User

Reprinted from: http://blog.joycode.com/joy/archive/2006/11/21/87386.aspx

We will continue to talk about the development of Sidebar gadget today. This article will be the last one in this tutorial, because after learning about the general situation of the gadget, You need to perform your own exercises. You can accumulate rich development experience only when you are diligent in practice, rather than watching tutorials with peace of mind. In addition, you only need to have a few points and do not need to elaborate on some details.

From two weeks ago, we have developed a workshop for two partner nodes. Each partner describes the actual requirement for job training. At present, this effect is very good. We suggest you study it at work.

In the previous tutorial, we finally gave several questions. Answer this question one by one.

How does one include the configuration interface in the gadget? That is, the icon similar to a banner?
In fact, the answer to this question is very simple. You only need to add a sentence: system. Gadget. settingsui = "settings.htm" to the Javascript associated with the main interface. The settings.htm in this sentence can be replaced by other names.

How does one make the gadget display the flyout interface?
As shown above, you only need to add one sentence: system. Gadget. flyout. File = "flyout.htm". You can replace flyout.htm in this sentence with other file names. To display the flyout interface (such as a hyperlink click event or a double-click event of an image control), call system. Gadget. flyout. Show = true without other settings. Of course, you can perform some other processing during display, so you can call its event function, that is, system. gadget. flyout. onshow (pointing to a function name), the corresponding hidden event function is system. gadget. flyout. onhide Functions

How to obtain system information?
Sidebar extends some APIs for JavaScript to execute External commands, obtain system information, or call the internal components of the gadget (such as flyout and settingsui). For more information about these APIs, see: http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/sidebar/reference/refs. asp to get more detailed information.

How can I achieve partial refreshing without using the ASP. NET Ajax framework?
It is simpler. Use the asynchronous call method of the function Microsoft XMLHTTP. For more information about XMLHTTP, see related information. This section describes how to Implement Asynchronous calls. In addition, if you encounter ie cache problems during the call, you can use setRequestHeader ("If-modified-since", "0") (thanks to symbio for providing information ), for XML analysis, Microsoft xmldom can be used.

Some gadget display styles are set to sidebar, while dragging them to the desktop has another display method. How does this happen?
This is simpler. CheckSource codeYou can know whether the system.gadget.doc ked attribute of the gadgetget tool is placed on the sidebar (when it is true, it is on the sidebar), and then call js to change its CSS features.

Now, the sidebar gadget tutorial ends. Thank you very much. :)
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.