rickyca
11-26-2002, 05:24 AM
Hello, I am right now working on a product catalog which use Javascript to sort product table in XML, the style sheet was written in CSS, and the XML page need to be shown with Mozilla.
************here is the XML table****************
<Catalog xmlns:html="http://www.w3.org/1999/xhtml">
<html:body onload="identifyProducts()">
<html:form name="searchForm">
<html:h2 align="center">Welcome to our online catalog!</html:h2>
<html:p align="center">
<html:input type="button" value="Suprimer" onclick="supri()"/>
</html:p>
<html:p align="center">
<html:input type="button" value=" Trier " onclick="showA1()" />
</html:p>
<html:p align="center">
<html:input type="button" value=" add " onclick="add()" />
</html:p>
</html:form>
<html:script language="JavaScript" src="tri.js"/>
</html:body>
<Product id="r1" >
<Title TYPE="racquet" Availability="Yes">Type de produit</Title>
<Description>Description</Description>
<Manufactor>Fabriqueur</Manufactor>
<Price>Prix</Price>
</Product>
<Product id="r2" >
<Title TYPE="racquet" Availability="Yes">MusclePower 100</Title>
<Description>Ultimum Ti Power, Extra Stiff</Description>
<Manufactor>Yonex</Manufactor>
<Price>$285</Price>
</Product>
</Catalog>
****************the CSS file****************
Catalog
{display: block;
width: 100%;
text-align: left}
Product
{border: 1px solid;
display: table;
padding: 5px;
width: 100%}
titre
{background-color: #bbbbff;
border: 5px ridge;
display: block;
font-size: xx-large;
font-weight: bold;
marge-top: 25px;
padding: 5px;
text-align: center}
model1
{display: table-cell;
width: 25%;
text-align: center}
Title
{background-color: #d5d5ff;
display: table-cell;
border: 1px solid;
width: 20%;
text-align: left}
Description
{display: table-cell; padding: 5px; width: 25%; text-align: left}
desc
{display: table-cell; width: 25%; text-align: left}
Manufacteur
{display: table-cell; width: 25%; text-align: center}
avail
{display: table-cell; width: 25%; text-align: center}
Price
{display: table-cell; width: 25%; text-align: center}
splay: table-cell; width: 25%; text-align: center}
**********************************************
any one can tell me how can I sort products with Price.
thanks.
************here is the XML table****************
<Catalog xmlns:html="http://www.w3.org/1999/xhtml">
<html:body onload="identifyProducts()">
<html:form name="searchForm">
<html:h2 align="center">Welcome to our online catalog!</html:h2>
<html:p align="center">
<html:input type="button" value="Suprimer" onclick="supri()"/>
</html:p>
<html:p align="center">
<html:input type="button" value=" Trier " onclick="showA1()" />
</html:p>
<html:p align="center">
<html:input type="button" value=" add " onclick="add()" />
</html:p>
</html:form>
<html:script language="JavaScript" src="tri.js"/>
</html:body>
<Product id="r1" >
<Title TYPE="racquet" Availability="Yes">Type de produit</Title>
<Description>Description</Description>
<Manufactor>Fabriqueur</Manufactor>
<Price>Prix</Price>
</Product>
<Product id="r2" >
<Title TYPE="racquet" Availability="Yes">MusclePower 100</Title>
<Description>Ultimum Ti Power, Extra Stiff</Description>
<Manufactor>Yonex</Manufactor>
<Price>$285</Price>
</Product>
</Catalog>
****************the CSS file****************
Catalog
{display: block;
width: 100%;
text-align: left}
Product
{border: 1px solid;
display: table;
padding: 5px;
width: 100%}
titre
{background-color: #bbbbff;
border: 5px ridge;
display: block;
font-size: xx-large;
font-weight: bold;
marge-top: 25px;
padding: 5px;
text-align: center}
model1
{display: table-cell;
width: 25%;
text-align: center}
Title
{background-color: #d5d5ff;
display: table-cell;
border: 1px solid;
width: 20%;
text-align: left}
Description
{display: table-cell; padding: 5px; width: 25%; text-align: left}
desc
{display: table-cell; width: 25%; text-align: left}
Manufacteur
{display: table-cell; width: 25%; text-align: center}
avail
{display: table-cell; width: 25%; text-align: center}
Price
{display: table-cell; width: 25%; text-align: center}
splay: table-cell; width: 25%; text-align: center}
**********************************************
any one can tell me how can I sort products with Price.
thanks.