Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Why is my .NET XML Control not working in Firefox?

Posted on 2008-10-05
1
Medium Priority
?
309 Views
Last Modified: 2013-12-07
I have a .NET XML Control on my page which holds the following data for example:

<XML ID="CompanyModulePages">
 <NavPages>
  <NavPage>
    <Tier>1</Tier>
    <Description>Home</Description>
    <CssClass>CatHeader</CssClass>
    <ImageLocation></ImageLocation>
    <WebPath>/modules/Ordering/welcome.aspx</WebPath>
    <WebParms></WebParms>
  </NavPage>
  <NavPage>
    <Tier>2</Tier>
    <Description>Search/Browse Items</Description>
    <CssClass></CssClass>
    <ImageLocation></ImageLocation>
    <WebPath>/modules/Ordering/Orders/ItemSearch.aspx</WebPath>
    <WebParms></WebParms>
  </NavPage>
</NavPages>
</XML>

I don't actually want the XML data displayed in any way on the screen, but I want to be able to access the XML control in Javascript.  This works fine in IE but I am having the following problems in Firefox:

1.  The XML is displayed on the screen as plain text in Firefox, while being hidden in IE.  I want it to be hidden because I am only using this control to store XML information which I will be using in Javascript.  For Example, it's displayed as follows in Firefox:

 1  Home  CatHeader   /modules/Ordering/welcome.aspx     2  Search/Browse Items    /modules/Ordering/Orders/ItemSearch.aspx     2  English        3  Booth Display  CatHeader   /modules/Ordering/Orders/ItemCategory.aspx  txtWebCategory=923

In IE, this information is not displayed, which is what I want.

2.  I can access the control in IE using either this method (CompanyModulePages is the ID of the control):

oXML = document.getElementById("CompanyModulePages").XMLDocument;      

Or this method:

oXML = CompanyModulePages.XMLDocument;      

In Firefox, the first method retrieves a control but it seems to be an unknown control and I can't retrieve the XML Document.


Anyone have any ideas on this subject?


Thank you.
0
Comment
Question by:Leo Eikelman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
HeoQue earned 2000 total points
ID: 22858014
that should work in FireFox, however try getting the control name dynamically instead :

oXML = document.getElementById('<%=CompanyModulePages.ClientID %>').XMLDocument;    
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question