I am trying that now (data island?). I want to use the xml data to populate
a client side control. So all of my code must be client side script (style
sheet will not work) and I am having some trouble getting hold of the
elements in the xml from client script. Using VB script
What I have, and where my current problem is:
===========================
<%@ Import Namespace="System.Xml.Xsl" %>
<%@ Import Namespace="System.Xml" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="ListBarNav.aspx.vb" Inherits="ELFsearchClient.ListBarNav" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>ELF Navigation</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<meta http-equiv="Content-Language" content="en-us">
<meta content="JavaScript" name="vs_defaultClientScript">
<!-- ================================================== ========== //-->
<SCRIPT language="vbscript" id="clientEventHandlersVBS">
<!--
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub window_onload
LoadBarItems
End Sub
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub LoadBarItems
Dim nIndex
. . .
nIndex = me.document.frmMain.lbNav.AddList("My Data")
Load_Groups nIndex
. . .
End Sub
'
-------------------------------------------------------------------------------
Sub Load_Groups(ByVal nIndex)
Dim sQuery
Dim iCount
Dim sPath
Dim doc
Dim root
Dim nodes
Dim rootnode
Dim nodeGroup
Dim nodeGroupNo
Dim nodeC
Dim iDay
Dim sErrMsg
Dim oErr
Dim oNode
Dim oRoot
Dim iCnt
iCnt =1
me.document.frmMain.hdnGroup.value = "GROUP"
set doc = CreateObject("Microsoft.XMLDOM")
doc.async ="false"
'''''''''''''''''''''' REMED OUT, GIVES WARNING MSG ''''''''
'sPath = document.frmMain.hdnPathXML.Value
'doc.Load(sPath)
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
doc.Load(getDataIsland()) 'DOSEN'T WORK, BUT NEITHER HAS ANYTHING
'ELSE I'VE TRIED
set oRoot = doc.DocumentElement
For Each nodeGroup In oRoot.ChildNodes
... do things with xml data
NEXT
End Sub
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
</SCRIPT>
<!-- START JAVASCRIPT //-->
<script language="javaScript" type="text/javascript">
function getDataIsland() {
if (xmdoc.parseError.errorCode == 0)
{
var data = xmdoc.XMLDocument.xml;
return data;
}
}
</SCRIPT>
<!-- ================================================== ========== //-->
<BODY >
<OBJECT id="MSXML4" style="DISPLAY: none"
codeBase="msxml4.cab#version=4,20,9818,0" type="application/x-oleobject"
height="1"
data="data:application/x-oleobject;base64,EQ/Z9nOc0xGzLgDAT5kLtA=="
align="top"
classid="clsid:88d969c0-f192-11d4-a65f-0040963251e5" VIEWASTEXT
DESIGNTIMEDRAGDROP="370">
</OBJECT>
<!-- START: Client Side Data Island //-->
<xml id="xmdoc" src=document.frmMain.hdnPathXML.Value />
<!-- END: Client Side Data Island //-->
<form id="frmMain" method="post" runat="server" >
. . .
- - - -
"Tim Williams" wrote:
Have you tried just including the xml in the page source instead?
Tim
"kermit" <ke****@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.com...I in the asp pages server side code, on page load, I create and save
the xml
file to a directory on the server.
"Tim Williams" wrote:
Where is the XML file being loaded from?
Tim
"kermit" <ke****@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
>I asp.net pages that run on an intranet IIS server. Some op the
>pages use
> XLM DOM doc.Load(sPath) to open and parse a XML file. Every
> time
> the
> doc.Load(sPath) executes in IE6 a warning message comes up
> "This page is accessing information that is not under it's
> control.
> . . "
>
> How can I avoid this message. It is a great anoyance to the
> users.
> Do I
> need to create some time of certificate to pass...
>
> Help! Need direction.
>
> Thank you in advance.