JavaScript DHTML/SmartClient/DetailViewer

Материал из Web эксперт
Перейти к: навигация, поиск

DetailViewer with data store

   <source lang="html4strict">


<HTML><HEAD>

 <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
   <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
   <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
   <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
   <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
   <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
   <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
 <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>

</HEAD><BODY BGCOLOR="papayawhip" MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>

<IMG SRC=images/blank.gif WIDTH=1 HEIGHT=4>


<SCRIPT> var animalData = [

   {commonName:"Elephant (African)",scientificName:"Loxodonta africana",diet:"Herbivore",lifeSpan:" 40-60 years",information:"The African Elephant is the largest of all land animals and also has the biggest brain of any land animal. Both males and females have ivory tusks. Elephants are also wonderful swimmers. Man is the only real enemy of the elephant. Man threatens the elephant by killing it for its tusks and by destroying its habitat.",status:"Threatened"},
   {commonName:"Alligator (American)",scientificName:"Allligator mississippiensis",diet:"Carnivore",lifeSpan:"50 years",information:"In the 16th century, Spanish explorers in what is now Florida encountered a large formidable animal which they called "el largo" meaning "the lizard". The name "el largo" gradually became pronounced "alligator".",status:"Not Endangered"}

], animalFields = [

   {name:"commonName", type:"text", title:"Animal"},
   {name:"scientificName", type:"text", title:"Scientific Name"},
   {name:"diet", type:"text", title:"Diet"},
   {name:"lifeSpan", type:"text", title:"Average Life Span"},
   {name:"information", type:"text", title:"Interesting Information"}

]; DetailViewer.create({

   data:animalData,
   fields:animalFields,
   left:20,
   top:45,
   width:500

}); </SCRIPT> </BODY> </HTML>

 </source>