An Update to PubChem Widgets

PubChem Widgets 2.0f is released. The update substantially updates all table-based widgets and classification widgets, while adding new capabilities and features. The autocomplete widget remains unchanged from the previous version.

 

What are PubChem Widgets?

PubChem content is enormous and changes on a daily basis.  Keeping an effective mirror of this corpus is not trivial.  PubChem Widgets enable scientific web developers to display PubChem content within webpages they design.  All data comes directly from PubChem and, therefore, obviates the need to mirror that content.  This makes it easier to harness the vast scientific knowledge within PubChem on your own webpage, such as summaries of patents, bioactivities and PubMed articles linked to a PubChem record. They can also be used to provide an autocomplete function that suggests a list of terms when you type input into a search field.

 

What is new in PubChem Widgets 2.0f?

  • Simpler to embed
    It is now simpler to embed a data view widget into any web page using PubChem Widgets 2.0f. All you need is to include an HTML iframe tag with a proper URL as the ‘src’ attribute. For instance, to embed a PubChem widget from the above example, add the following code to your webpage at the location where you want the widget to appear:

    <iframe class="pubchem-widget" 
            src="https://pubchem.ncbi.nlm.nih.gov/compound/tiformin#section=InChI&embed=true" 
            style="border: 0;  width: 100%; height: 250px;">
    </iframe>
    

    The widget then renders the desired content for you.

  • Easier to resize
    The open source iframe resizer is able to resize an iframe automatically for you. To use it, add the following code to your page (only once, even if you have multiple PubChem widgets on the same page) just before the closing body tag:

    <script type="text/javascript" src="https://pubchem.ncbi.nlm.nih.gov/pcfe/libs/iframeResizer.min.js"></script>
    <script type="text/javascript">iFrameResize({log:false,checkOrigin:false}, '.pubchem-widget')</script>
    

 

How to convert to PubChem Widgets 2.0f?

Detailed instruction on how to convert PubChem Widgets 2.0f is given in this Conversion Guide.  PubChem Widgets 1.0 will be retired soon.  If you are using the PubChem Widgets 1.0 tables and classifications in your web pages, please update to PubChem Widgets 2.0f as soon as possible.  [Please note there is no change required for conversion of the autocomplete widgets.]

 

For more information on PubChem Widgets 2.0f, please read these pages:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s