PHP & JavaScript Room :: 設置サンプル

実行結果

Windows新着ソフトランキング 07.06.20~07.07.19

※表頭部分をクリックすると、その列をソートします。

順位 ソフト名 カテゴリ 説明 ファイルサイズ
{@recordid} {PRODUCT} {CATEGORY} {DESCRIPTION} {SIZE}KB

設置サンプルのソース

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja" dir="ltr">
<head profile="http://purl.org/net/uriprofile/">
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta http-equiv="Content-Language" content="ja" />
   <meta http-equiv="Content-Style-Type" content="text/css" />
   <meta http-equiv="Content-Script-Type" content="text/javascript" />
   <title>Spry: XMLデータ出力(ソートあり)</title>
   <script src="/content/spry/includes/xpath.js" type="text/javascript"></script>
   <script src="/content/spry/includes/SpryData.js" type="text/javascript"></script>
   <link rel="stylesheet" type="text/css" href="/module/include/ajax/adobespry_xml/ranking.css" />
<link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>

<body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
<div class="wrapper">
   <h1>Windows新着ソフトランキング <span>07.06.20~07.07.19</span></h1>
   <p>※表頭部分をクリックすると、その列をソートします。</p>
   <div spry:region="dsRanking">
      <table>
         <tr>
            <th spry:sort="@recordid">順位</th>
            <th spry:sort="PRODUCT">ソフト名</th>
            <th spry:sort="CATEGORY">カテゴリ</th>
            <th spry:sort="DESCRIPTION">説明</th>
            <th spry:sort="SIZE">ファイルサイズ</th>
         </tr>
         <tr   spry:repeat="dsRanking">
            <td class="rank">{@recordid}</td>
            <td>{PRODUCT}</td>
            <td>{CATEGORY}</td>
            <td>{DESCRIPTION}</td>
            <td class="fsize">{SIZE}KB</td>
         </tr>
      </table>
   </div>
</div>
<script type="text/javascript">
var dsRanking = new Spry.Data.XMLDataSet("/module/include/ajax/adobespry_xml/ranking.xml", "SOFTWEAR/ROW");
</script>

</body>
</html>