Hello Zifter,
here is my code
woould you please tell me where is the error ???
b'coz I am getting the same error like "Table1" is required.
<html>
<head>
<script type="text/vbscript">
function TableCreate()
strTable2 = strTable2 & document.write("<p>")
strTable2 = strTable2 & document.write("<table border=1>")
strTable2 = strTable2 & document.write("<tr>")
strTable2 = strTable2 & document.write("<th >" + "Annotation" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "EntityID" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "ProfileName" + "</th>")
strTable2= strTable2 & document.write("<th >" + "ServiceCategory" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "PCR" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "CDVT" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "FrameDiscard" + "</th>")
if x.length-1 > 10 then
if x.item(11).getAttribute("serviceCategory")="nrtVbr" then
strTable2 = strTable2 & document.write("<th >" + "SCR" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "MBS" + "</th>")
end if
elseif y.length > 0 then
if y.item(1).getAttribute("serviceCategory")="nrtVbr" then
strTable2 = strTable2 & document.write("<th >" + "SCR" + "</th>")
strTable2 = strTable2 & document.write("<th >" + "MBS" + "</th>")
end if
end if
strTable2 = strTable2 & document.write("</tr>")
Table1.InnerHTML = Table1.innerHTML & strTable2
end function
</script>
</head>
<body>
<h1>Edit the Value</h1>
<br></br>
<INPUT TYPE="Button" NAME="Btnedit" VALUE="Check For Edit Value" onclick="TableCreate()">
<script type="text/vbscript">
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
//xmlDoc.load("NBV2_HSDPA_1STM1_40M_6BB_4VC_1VP_01.xml")
xmlDoc.load("NBV2_HSDPA_4E1_8M_IMA_4BB_3VC_2VP_01.xml")
set x=xmlDoc.getElementsByTagName("CbrTrafficDescriptor")
set y=xmlDoc.getElementsByTagName("VbrTrafficDescriptor")
dim pcr_value(80)
dim cdvt_value(80)
dim scr_value(80)
dim mbs_value(80)
dim text_name(500)
document.write("<div id=""Table1"">")
document.write("<table border=1>")
document.write("<tr>")
document.write("<th >" + "Annotation" + "</th>")
document.write("<th >" + "EntityID" + "</th>")
document.write("<th >" + "ProfileName" + "</th>")
document.write("<th >" + "ServiceCategory" + "</th>")
document.write("<th >" + "PCR" + "</th>")
document.write("<th >" + "CDVT" + "</th>")
document.write("<th >" + "FrameDiscard" + "</th>")
if x.length-1 > 10 then
if x.item(11).getAttribute("serviceCategory")="nrtVbr" then
document.write("<th >" + "SCR" + "</th>")
document.write("<th >" + "MBS" + "</th>")
end if
elseif y.length > 0 then
if y.item(1).getAttribute("serviceCategory")="nrtVbr" then
document.write("<th >" + "SCR" + "</th>")
document.write("<th >" + "MBS" + "</th>")
end if
end if
document.write("</tr>")
For i = 0 to x.length-1
Document.write("<tr>")
Document.write("<td >" + x.item(i).text + "</td>")
Document.write("<td>"+x.item(i).getAttribute("managedEntityId")+"</td>")
Document.write("<td>"+x.item(i).getAttribute("profileName")+"</td>")
Document.write("<td>"+x.item(i).getAttribute("serviceCategory")+"</td>")
if i = 6 then
Document.write("<td>"+x.item(i).getAttribute("pcr")+"</td>")
Document.write("<td>"+x.item(i).getAttribute("cdvt")+"</td>")
elseif i = 9 then
Document.write("<td>"+x.item(i).getAttribute("pcr")+"</td>")
elseif i = 10 then
Document.write("<td>"+x.item(i).getAttribute("pcr")+"</td>")
else
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & x.item(i).getAttribute("pcr") & " size=""13""></TD>"
end if
if i < 9 then
if i <>6 then
Document.write("<td>"+x.item(i).getAttribute("cdvt")+"</td>")
end if
else
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & x.item(i).getAttribute("cdvt") & " size=""13""></TD>"
end if
Document.write("<td>"+x.item(i).getAttribute("frameDiscard")+"</td>")
if i > 10 and y.length > 0 then
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & x.item(i).getAttribute("scr") & " size=""13""></TD>"
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & x.item(i).getAttribute("mbs") & " size=""13""></TD>"
end if
Document.write("</tr>")
Next
j=i
For k = i to y.length+x.length-1
Document.write("<tr>")
Document.write("<td >" + y.item(k-i).text + "</td>")
Document.write("<td>"+y.item(k-i).getAttribute("managedEntityId")+"</td>")
Document.write("<td>"+y.item(k-i).getAttribute("profileName")+"</td>")
Document.write("<td>"+y.item(k-i).getAttribute("serviceCategory")+"</td>")
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & y.item(k-i).getAttribute("pcr") & " size=""13""></TD>"
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & y.item(k-i).getAttribute("cdvt") & " size=""13""></TD>"
Document.write("<td>"+""+"</td>")
if ( k >10 and y.item(k-i).getAttribute("serviceCategory")="nrtVbr" ) then
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & y.item(k-i).getAttribute("scr") & " size=""13""></TD>"
Document.Write "<TD><INPUT TYPE=" & Chr(34) & "Text" & Chr(34) & " NAME=" & Chr(34) & "Text" & i & Chr(34) & " VALUE=" & y.item(k-i).getAttribute("mbs") & " size=""13""></TD>"
end if
Document.write("</tr>")
j=j+1
Next
document.write("</table>")
document.write("</div>")
</script>
</body>
</html>