HTMLDataSet using Internal Table as Data Source

This page demonstrates how to use a HTMLDataSet to load the data from a table located in the current file.

The use HTMLDataSet is similar to that of a XMLDataSet. The data can be loaded from a HTML Element (such as a <table>) located in the same file or in a different file under the same domain.
Optional parameters used with a XMLDataSet to specify sorting, caching, district, loadInterval work in a similar way with the HTMLDataSet.


In this sample the HTMLDataSet is loading its data from the table with the ID "productsTable" located at the bottom of this file. The HTMLDataSet hides the source element (table) when the page loads. To overwrite this behavior, use 'hideDataSourceElement:false' in the optional parameters.
Here's the constructor code for the data set used in the sample. Notice the passing of null instead of a file URL. When the URL is null, the data source is assumed to be on the same page and is automatically hidden.

	var ds1 = new Spry.Data.HTMLDataSet(null, "productsTable");

By default, the cells from the first row are used as headers. However, this can be changed by specifying 'firstRowAsHeaders:false' in the constructor optional parameters.
Also, an optional array with column names can be passed in order to specify your own column names to be used. Use columNames:["FirstCol", "SecondCol"]

Note: The values in the first row of data that are used as headers should not contain spaces or other tags. The tags are removed and the spaces are replaced with underscore (_).
E.g.: The values under the header <strong>product features</strong> will be accessed inside a spry:region with this markup: {product_features}


  • Adobe Photoshop CS2
  • Adobe Illustrator CS2
  • Adobe InDesign CS2
  • Adobe GoLive CS2
  • Adobe Dreamweaver 8
  • Adobe Flash 8 Professional
  • Adobe Fireworks 8
  • Adobe Premiere 2.0
  • Adobe After Effects 7.0 Professional
  • Adobe After Effects 7.0 Standard
  • Adobe Encore DVD 2.0
  • Adobe Audition 2.0
  • Adobe Studio 8
  • Adobe Creative Suite 2 Premium
  • Adobe Creative Suite 2 Standard
  • Adobe Creative Suite Production Studio Premium
  • Adobe Design Bundle
  • Adobe Web Bundle
  • Adobe Video Bundle
  • Adobe Acrobat Professional
  • Adobe Acrobat Standard
Description:
Adobe® Photoshop® CS2 software, the professional image-editing standard and leader of the Photoshop digital imaging line, delivers more of what you crave. Groundbreaking creative tools help you achieve extraordinary results. Unprecedented adaptability lets you custom-fit Photoshop to the way you work. And with more efficient editing, processing, and file handling, there's no slowing you down.
 
Features:
  • Revolutionary Vanishing Point
  • Multiple layer control
  • Smart Objects
  • Multi-image digital camera raw file processing
  • Image Warp