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="Syst em.Xml.Xsl" %>
<%@ Import Namespace="Syst em.Xml" %>
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Lis tBarNav.aspx.vb " Inherits="ELFse archClient.List BarNav" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>ELF Navigation</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="Visual Basic .NET 7.1" name="CODE_LANG UAGE">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<meta http-equiv="Content-Language" content="en-us">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<!-- =============== =============== =============== =============== //-->
<SCRIPT language="vbscr ipt" id="clientEvent HandlersVBS">
<!--
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub window_onload
LoadBarItems
End Sub
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub LoadBarItems
Dim nIndex
. . .
nIndex = me.document.frm Main.lbNav.AddL ist("My Data")
Load_Groups nIndex
. . .
End Sub
'
-------------------------------------------------------------------------------
Sub Load_Groups(ByV al 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.frm Main.hdnGroup.v alue = "GROUP"
set doc = CreateObject("M icrosoft.XMLDOM ")
doc.async ="false"
''''''''''''''' ''''''' REMED OUT, GIVES WARNING MSG ''''''''
'sPath = document.frmMai n.hdnPathXML.Va lue
'doc.Load(sPath )
''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' '
doc.Load(getDat aIsland()) 'DOSEN'T WORK, BUT NEITHER HAS ANYTHING
'ELSE I'VE TRIED
set oRoot = doc.DocumentEle ment
For Each nodeGroup In oRoot.ChildNode s
... do things with xml data
NEXT
End Sub
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
</SCRIPT>
<!-- START JAVASCRIPT //-->
<script language="javaS cript" type="text/javascript">
function getDataIsland() {
if (xmdoc.parseErr or.errorCode == 0)
{
var data = xmdoc.XMLDocume nt.xml;
return data;
}
}
</SCRIPT>
<!-- =============== =============== =============== =============== //-->
<BODY >
<OBJECT id="MSXML4" style="DISPLAY: none"
codeBase="msxml 4.cab#version=4 ,20,9818,0" type="applicati on/x-oleobject"
height="1"
data="data:appl ication/x-oleobject;base6 4,EQ/Z9nOc0xGzLgDAT5 kLtA=="
align="top"
classid="clsid: 88d969c0-f192-11d4-a65f-0040963251e5" VIEWASTEXT
DESIGNTIMEDRAGD ROP="370">
</OBJECT>
<!-- START: Client Side Data Island //-->
<xml id="xmdoc" src=document.fr mMain.hdnPathXM L.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****@discuss ions.microsoft. com> wrote in message
news:31******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:83******** *************** ***********@mic rosoft.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.