You seem to set xmldoc to an ActiveX object, then 2 lines below that,
you remove the reference to the object by redeclaring xmldoc as
document.getElementById("PB") which probably refers then to your HTML
document rather than the xmldoc you thought you had instantiated. Was
that an intentional error ?
HTH
Neil.
On Thu, 21 Aug 2003 14:42:23 -0400, "Jim Mitchell"
<ji**********@mindspring.com> wrote:
I am getting an error...
elem is null or not an object using the following Client side javascript.
Can someone give me some help? Thanks in advance.
<XML ID="PB">
<ProductItem>
<Product ID="Adhesive">
<ItemType>Machine</ItemType>
</Product>
</ProductItem>
</XML>
<script language=javascript>
var root = new ActiveXObject("Microsoft.XMLDOM")
var xmldoc = new ActiveXObject("Microsoft.XMLDOM")
xmldoc.async = false;
xmldoc = document.getElementById("PB")
root = xmldoc.documentElement;
elem = root.getElementsByTagName("Product").item(0).docum entElement
elemvalue = elem.getAttribute("ID")
</script>
================================================== ======
CaptionKit
http://www.captionkit.com : Produce subtitled
internet media, transcripts and searchable video. Supports
Real Player, Quicktime and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at
http://www.fresh-toast.net : NetMeeting solutions
for a connected world.