Hi
I've got a javascript menu on my intranet site that works on all the pages except one and I don't know why! I just get an I just get an expected end of statement error. Can anyone help me?!
<html>
<head>
<xml id="oXML"></xml>
<script language="VBScript">
Option Explicit
Dim rs
Sub PopulateSubTree(oTreeNode, oXMLNode)
Dim oNewTreeNode
Dim oXMLSubNode
Dim new_key
Const tvwChild = 4
' add the current node to the tree
new_key = "_" & oXMLNode.selectSingleNode("@id"
.nodevalue
set oNewTreeNode = TreeView1.Nodes.Add(oTreeNode.key, tvwChild,new_key, oXMLNode.selectSingleNode("@name"
.nodeValue)
' recursively call the sub to add any children
for each oXMLSubNode in oXMLNode.selectNodes("user"
Call PopulateSubTree(oNewTreeNode, oXMLSubNode)
next
oNewTreeNode.Expanded = true
End Sub
Function PopulateTree()
Dim oRoot
with oXML.XMLDocument
.async = false
if .load("el_supremo.xml"
Then
set oRoot = TreeView1.Nodes.Add(,,"_-1","AWOL"
oRoot.Expanded = true
call PopulateSubTree(oRoot, oXML.SelectSingleNode("/xml/user"
)
else
msgbox "Couldn't load xml file because " & .parseError.reason
End if
end with
End Function
</script>
</head>
<body onload="VBScript
opulateTree">
<SCRIPT language="JavaScript" src="jscript/admin_menu_array.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScrip"t src="jscript/mmenu.js" type="text/javascript"></SCRIPT>
<table height="25" border="0" cellpadding="0" cellspacing="0" width="600">
<tr align="left">
<FONT color=#ffffff><B></B></FONT><td align="left" bgcolor="#333366"><IMG align=bottom border=0 src="graphics/a.gif"></td>
<td align="right" bgcolor="#333366"><font color="#ffffff" SIZE="3"><b>XXX</b></font></td></tr>
</table>
<br>
<br>
<br>
<font size=4 color="#ff6702">Team Structure</font>
<br>
<br>
<OBJECT classid="clsid:C74190B6-8589-11D1-B16A-00C0F0283628" height=345 id=TreeView1
style="FONT-FAMILY: tahoma; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 345px; LEFT: 0px; TOP: 0px; WIDTH: 600px"
width=600>
<PARAM NAME="_ExtentX" VALUE="15875">
<PARAM NAME="_ExtentY" VALUE="9128">
<PARAM NAME="_Version" VALUE="393217">
<PARAM NAME="HideSelection" VALUE="0">
<PARAM NAME="Indentation" VALUE="741">
<PARAM NAME="LabelEdit" VALUE="1">
<PARAM NAME="LineStyle" VALUE="0">
<PARAM NAME="PathSeparator" VALUE="\">
<PARAM NAME="Sorted" VALUE="1">
<PARAM NAME="Style" VALUE="6">
<PARAM NAME="Checkboxes" VALUE="0">
<PARAM NAME="FullRowSelect" VALUE="0">
<PARAM NAME="HotTracking" VALUE="0">
<PARAM NAME="Scroll" VALUE="1">
<PARAM NAME="SingleSel" VALUE="0">
<PARAM NAME="ImageList" VALUE="">
<PARAM NAME="BorderStyle" VALUE="1">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="MousePointer" VALUE="0">
<PARAM NAME="Enabled" VALUE="1">
<PARAM NAME="OLEDragMode" VALUE="0">
<PARAM NAME="OLEDropMode" VALUE="0"></OBJECT>
<BR>
<BR>
</body>
</html>
I've got a javascript menu on my intranet site that works on all the pages except one and I don't know why! I just get an I just get an expected end of statement error. Can anyone help me?!
<html>
<head>
<xml id="oXML"></xml>
<script language="VBScript">
Option Explicit
Dim rs
Sub PopulateSubTree(oTreeNode, oXMLNode)
Dim oNewTreeNode
Dim oXMLSubNode
Dim new_key
Const tvwChild = 4
' add the current node to the tree
new_key = "_" & oXMLNode.selectSingleNode("@id"
set oNewTreeNode = TreeView1.Nodes.Add(oTreeNode.key, tvwChild,new_key, oXMLNode.selectSingleNode("@name"
' recursively call the sub to add any children
for each oXMLSubNode in oXMLNode.selectNodes("user"
Call PopulateSubTree(oNewTreeNode, oXMLSubNode)
next
oNewTreeNode.Expanded = true
End Sub
Function PopulateTree()
Dim oRoot
with oXML.XMLDocument
.async = false
if .load("el_supremo.xml"
set oRoot = TreeView1.Nodes.Add(,,"_-1","AWOL"
oRoot.Expanded = true
call PopulateSubTree(oRoot, oXML.SelectSingleNode("/xml/user"
else
msgbox "Couldn't load xml file because " & .parseError.reason
End if
end with
End Function
</script>
</head>
<body onload="VBScript
<SCRIPT language="JavaScript" src="jscript/admin_menu_array.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScrip"t src="jscript/mmenu.js" type="text/javascript"></SCRIPT>
<table height="25" border="0" cellpadding="0" cellspacing="0" width="600">
<tr align="left">
<FONT color=#ffffff><B></B></FONT><td align="left" bgcolor="#333366"><IMG align=bottom border=0 src="graphics/a.gif"></td>
<td align="right" bgcolor="#333366"><font color="#ffffff" SIZE="3"><b>XXX</b></font></td></tr>
</table>
<br>
<br>
<br>
<font size=4 color="#ff6702">Team Structure</font>
<br>
<br>
<OBJECT classid="clsid:C74190B6-8589-11D1-B16A-00C0F0283628" height=345 id=TreeView1
style="FONT-FAMILY: tahoma; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 345px; LEFT: 0px; TOP: 0px; WIDTH: 600px"
width=600>
<PARAM NAME="_ExtentX" VALUE="15875">
<PARAM NAME="_ExtentY" VALUE="9128">
<PARAM NAME="_Version" VALUE="393217">
<PARAM NAME="HideSelection" VALUE="0">
<PARAM NAME="Indentation" VALUE="741">
<PARAM NAME="LabelEdit" VALUE="1">
<PARAM NAME="LineStyle" VALUE="0">
<PARAM NAME="PathSeparator" VALUE="\">
<PARAM NAME="Sorted" VALUE="1">
<PARAM NAME="Style" VALUE="6">
<PARAM NAME="Checkboxes" VALUE="0">
<PARAM NAME="FullRowSelect" VALUE="0">
<PARAM NAME="HotTracking" VALUE="0">
<PARAM NAME="Scroll" VALUE="1">
<PARAM NAME="SingleSel" VALUE="0">
<PARAM NAME="ImageList" VALUE="">
<PARAM NAME="BorderStyle" VALUE="1">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="MousePointer" VALUE="0">
<PARAM NAME="Enabled" VALUE="1">
<PARAM NAME="OLEDragMode" VALUE="0">
<PARAM NAME="OLEDropMode" VALUE="0"></OBJECT>
<BR>
<BR>
</body>
</html>