External demo for the
Socrates (RESTful) Widget API

This also tests the "default search". When the user activates the search, results will already be pre-filled. This is very useful for populating results specific to the page currently viewed.

To add a default search, in your header simply include the "soc:search" meta tag with keywords or search terms.

Example:
<head>
<meta name="soc:default-action" content="click" />
<meta name="soc:search" content="ultimate 3000" />
<meta name="soc:search-experts" content="true" />
</head>


JavaScript APIs for Developers

1. PUBLIC_SOCRATES.open_widget()

Open the widget programmatically: Allows specifying a button, link or any other HTML element to open the widget.

2. PUBLIC_SOCRATES.search('')

Perform a search programmatically: Commonly used to perform a specific search when clicking a particular button or link.

Example:
<a href="#" class="js_soc-search-link" title="色谱法的发展历史如何?">
  <strong>1. Standard Query</strong><br />
  色谱法的发展历史如何?
</a>
<script type="text/javascript">
  $(document).ready(function () {
    // when clicking an element with the class "js_soc-search-link"...
    $('.js_soc-search-link').click(function (e) {
      e.preventDefault();

      PUBLIC_SOCRATES.open_widget(); // open the widget
      PUBLIC_SOCRATES.search($(this).attr('title')); // perform a search with the link's title attribute
    });
  });
</script>

Try some of these sample
queries or search your own.

1. Standard Query
色谱法的发展历史如何?

2. Topical Query
UltiMate 3000钛系统

3. Partial Question Match
色谱法的发展历史如...

4. Partial Topic Match
Ultimate...

5. No Results > Submit New Question
是否有融资的UltiMate 3000钛系统计划?

6. No Results > No Experts Found
你怎么结合三聚氰胺生产三聚氰胺树脂吗?

7. Download the Video (60MB)