home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 December
/
PCWorld_2003-12_cd.bin
/
Software
/
komercni
/
alc
/
ep2sr51csy.msi
/
Ep.CAB
/
reph8
< prev
next >
Wrap
Text File
|
2002-02-25
|
4KB
|
159 lines
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title>Seznam p°edm∞t∙</title>
<link rel="stylesheet" href="%HTMLPATH%\style.css">
</head>
<script for="window" event="onload">
oOptions.src="%HTMLPATH_C%\\up.gif";
data.load("%XMLPATH_C%");
r=data.XMLDocument.selectSingleNode("/report");
// add kind tag
p=data.XMLDocument.createElement("kind");
r.appendChild(p);
// add columns tag
p=data.XMLDocument.createElement("columns");
r.appendChild(p);
oKind_init();
oProps_init();
transform();
</script>
<body>
<h1>Seznam p°edm∞t∙: <span id="oKindTitle"></span></h1>
<img id="oOptions" onclick="oOptions_onclick()" alt="zobrazit/skr²t volby" style="cursor:hand">
<table id="oOptionsTable" cellpadding="4">
<tr>
<td>
Druh:<br>
<SELECT id="oKind" LANGUAGE=javascript onchange="return oKind_onchange()">
<OPTION selected></OPTION>
</SELECT>
</td>
<td>
Vyberte druh p°edm∞t∙.
</td>
</tr>
<tr>
<td>
Vlastnosti:<br>
<SELECT id="oProps" size="10" multiple style="WIDTH: 240px"
>
</SELECT>
</td>
<td>
<P>
Vyberte vlastnosti, kterΘ se majφ zobrazit.<BR> N∞kolik polo₧ek m∙₧ete vybrat souΦasn²m stisknutφm klßvesy <STRONG>Ctrl</STRONG> a kliknutφm myÜφ na polo₧ce.<BR>
</P>
</td>
</tr>
<tr>
<td>
<INPUT id=oRedraw type=button value="P°ekreslit" LANGUAGE=javascript onclick="return oRedraw_onclick()">
</td>
<td>
Stiskn∞te toto tlaΦφtko pro p°ekreslenφ sestavy po zm∞n∞ nastavenφ.
</td>
</tr>
<TR>
<TD colspan=2> </TD>
</TR>
</table>
<div id="xslTarget"></div>
</body>
<xml id="data"></xml>
<xml id="sheet" src="%HTMLPATH%\Seznam p°edm∞t∙.xsl"></xml>
<script>
function oKind_onchange() {
p=data.XMLDocument.selectSingleNode("/report/kind");
p.text=oKind.options[oKind.selectedIndex].text;
oKindTitle.innerText=p.text;
transform();
}
function oKind_init() {
var dict=new ActiveXObject("Scripting.Dictionary");
p=data.XMLDocument.selectNodes("//prop[kind='Druh']/value");
var i;
for ( i=0; i<p.length; i++ ) {
if ( !dict.Exists(p[i].text) )
dict.Add(p[i].text,"");
}
ar=(new VBArray(dict.Keys())).toArray();
ar.sort();
for ( i in ar ) {
o=document.createElement("option");
o.innerText=ar[i];
oKind.appendChild(o);
}
}
function oProps_init() {
var dict=new ActiveXObject("Scripting.Dictionary");
p=data.XMLDocument.selectNodes("//prop/kind");
var i;
for ( i=0; i<p.length; i++ ) {
if ( !dict.Exists(p[i].text) )
dict.Add(p[i].text,"");
}
ar=(new VBArray(dict.Keys())).toArray();
ar.sort();
for ( i in ar ) {
o=document.createElement("option");
o.innerText=ar[i];
oProps.appendChild(o);
}
}
function oRedraw_onclick() {
r=data.XMLDocument.selectSingleNode("/report");
cols=r.selectSingleNode("columns");
if ( cols )
r.removeChild(cols);
p=data.XMLDocument.createElement("columns");
cols=r.appendChild(p);
for ( i=0; i<oProps.options.length; i++ ) {
if ( oProps.options[i].selected ) {
p=data.XMLDocument.createElement("kind");
p.text=oProps.options[i].text;
cols.appendChild(p);
}
}
transform();
}
function transform() {
xslTarget.innerHTML = data.transformNode(sheet.XMLDocument);
}
function oOptions_onclick() {
if ( oOptionsTable.style.display == "none" ) {
oOptionsTable.style.display="block";
oOptions.src="%HTMLPATH_C%\\up.gif";
}
else {
oOptionsTable.style.display="none";
oOptions.src="%HTMLPATH_C%\\down.gif";
}
}
</script>
</html>