I am trying to do some actions in my HTML file which gets the data from XML/XSL file using VB. This is how I want to display my data....I can get this far but I cant figure out the part that you click the Item or Detail and get the detail of that Item......
I found couple of examples but I cant implement them in VB and also I cant get it to work with my XML. This is exactly what I want...check out the link.
http://www.w3schools.com/xml/tryit.asp?filename=cd_applicationAny Help????
DISPLAY:
Order Number Item Amt
1 Widget $45 Details
2 Pencil $5 Details
3 Eraser $6 Details
4 Stapler $13 Details
1: allow the user to click on the column heading (order number, item
or amt) to resort by that column
2: allow the user to click on details for "pencil" and then display
the following details (still using XSL and the XML file)
Order Number: 2
Item: Pencil
Amt: $45
Color: Yellow
Use: To write with
Quantity: 345
**********************Here
is My XML file:*********************
*
<ROOT>
<ORDERS>
<ORDER NUMBER="1">
<ITEM>Widget</ITEM>
<AMT>45</AMT>
</ORDER>
<ORDER NUMBER="2">
<ITEM>Pencil</ITEM>
<AMT>5</AMT>
<DETAILS>
<COLOR>Yellow</COLOR>
<USE>To write with</USE>
<QUANT>345</QUANT>
</DETAILS>
</ORDER>
<ORDER NUMBER="3">
<ITEM>Eraser</ITEM>
<AMT>6</AMT>
<DETAILS>
<COLOR>Black</COLOR>
<USE>test</USE>
<QUANT>35</QUANT>
</DETAILS>
</ORDER>
<ORDER NUMBER="4">
<ITEM>Stapler</ITEM>
<AMT>13</AMT>
</ORDER>
</ORDERS>
</ROOT>
*****************Here is my HTML File***************
<html>
<body BGCOLOR="#f0f0ef">
<TABLE WIDTH="50%" BORDER="0" CELLSPACING="1" CELLPADDING="0" style="HEIGHT: 50px; WIDTH: 50%" align="center" borderColor="gray" bgColor="gray" ID="Table1">
<tr>
<td bgcolor="#ceffff"><b><font
size="2" face="Arial">Order Number </font></b>
</td>
<td bgcolor="#ceffff"><b><font
size="2" face="Arial">Item</font></
b></td>
<td bgcolor="#ceffff"><b><font
size="2" face="Arial">Amt</font></b
></td>
</tr>
<script LANGUAGE="VBSCRIPT">
SET xmlDoc = CreateObject("MICROSOFT.XM
LDOM")
xmlDoc.async = false
xmlDoc.load("frontenddev.x
ml")
document.write("<tr>")
document.write("<td>")
set x=xmlDoc.getElementsByTagN
ame("ORDER
")
for i = 1 to x.length
document.write(x.item(i-1)
.getAttrib
ute("NUMBE
R"))
document.write("<br>")
next
document.write("</td>")
document.write("<td>")
set x=xmlDoc.getElementsByTagN
ame("ITEM"
)
for i = 1 to x.length
document.write(x.item(i-1)
.text)
document.write("<br>")
next
document.write("</td>")
document.write("<td>")
set x=xmlDoc.getElementsByTagN
ame("AMT")
for i = 1 to x.length
document.write(x.item(i-1)
.text)
document.write("<br>")
next
document.write("</td>")
document.write("<tr>")
</script>
</TABLE>
<br>
</br>
</body>
</html>