473,698 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML DOM and Firefox

15 New Member
I've got an image, when I mouse over it a popup window shows and the person's hobbies are displayed using a CSS popup window. It works in IE, but not Firefox. Any idea why? (lines 23-31)

Expand|Select|Wrap|Line Numbers
  1.  
  2. <img name=showHobbies src="" style="position:absolute;left:550;top:25;width:100;height:50" onmouseover="show(fullfile)" onmouseout="hide()">
  3.  
  4.            function show(dataSource)
  5.             {
  6.  
  7.  
  8.  
  9.             if (window.ActiveXObject) {
  10.  
  11.             var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  12.             xmlDoc.async = false;
  13.             xmlDoc.load(dataSource);
  14.  
  15.  
  16.            var stringHobby = xmlDoc.documentElement.lastChild.firstChild.nodeValue;
  17.             var name = xmlDoc.getElementsByTagName("first")[0].firstChild.nodeValue;
  18.            document.getElementById("popup").innerHTML = name + "'s hobbies:\n" + stringHobby;
  19.  
  20.             }
  21.  
  22.             else {
  23.  
  24.              xmlDoc2= document.implementation.createDocument("","",null);
  25.              xmlDoc2.load(dataSource);
  26.  
  27.             // alert(xmlDoc2);
  28.             var x = xmlDoc2.getElementsByTagName("hobbies")[0].firstChild.nodeValue;
  29.             var name = xmlDoc2.getElementsByTagName("first")[0].firstChild.nodeValue;
  30.              //alert(x);
  31.             document.getElementById("popup").innerHTML=x;
  32.             //document.getElementById("popup").innerHTML="blah blah blah";
  33.  
  34.  
  35.             //myXMLHTTPRequest = new XMLHttpRequest();
  36.             //myXMLHTTPRequest.open("GET", dataSource, false);
  37.             //myXMLHTTPRequest.send(null);
  38.             //var xmlDoc = myXMLHTTPRequest.responseXML;
  39.  
  40.  
  41.  
  42.            //var stringHobby = xmlDoc.documentElement.lastChild.firstChild.nodeValue;
  43.            // var name = xmlDoc.getElementsByTagName("first")[0].firstChild.nodeValue;
  44.            //document.getElementById("popup").innerHTML = name + "'s hobbies:\n" + stringHobby;
  45.             }
  46.  
  47.  
  48.  
  49.  
  50.             var popwin = document.getElementById("popup");
  51.             popwin.style.visibility="visible";
  52.  
  53.  
  54.             }
  55.  
  56.  
  57.             function hide()
  58.             {
  59.             var popwin = document.getElementById("popup");
  60.             popwin.style.visibility="hidden";
  61.             }
  62.  
  63.  
  64.  
  65.  
Jun 20 '07 #1
3 2576
drhowarddrfine
7,435 Recognized Expert Expert
One problem is you aren't specifying units in your dimensions. You must specify px, ems, etc.

Also, this is more a javascript question.
Jun 20 '07 #2
rnd me
427 Recognized Expert Contributor
i don't see a script tag opening...

the code that isn't commented out looks ok at a glance, you sure you don't have any pop-up blockers active? (i had 3 in firefox. 3. And i didn't install a single one. (knowingly at least) grr yahoo
Jun 21 '07 #3
jpk872
15 New Member
I disabled 1 popup blocker, where would the others be?

I tried adding px to that code, but i don't really want to control it because it warps the size of the pictures. I might as well just delete the numbers in that tag.

The code is within script tags, (except for the HTML of course).
Jun 22 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
9287
by: Jeremy Epstein | last post by:
I've got a 4-page form that lets users enter a whole lot of information, which is then submitted and emailed at the end. All the fields are stored as session data. The whole thing works fine: 1. On my local box (WinXP / Apache2 / PHP4) using IE6 2. On my local box using Firefox1 3. On my hosted server (RHLinux / Apache1.3 / PHP4) using IE6
6
5021
by: Geoff | last post by:
When trying to focus a field in Firefox, I get the following error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html :: valText :: line 24" data: no] Source File: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html Line: 24 Anyone have any ideas as to why this is happening?
87
9585
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position: absolute;top:68px; left:563px; width:640px;height:480px;"> <IMG src="ReportImageBox_12.54.52.png" width=640 height=480></IMG>
14
2320
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT =============================================================== by Pamela Datatime Team -----------------
5
3113
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>> webbrowser.open("http://www.python.org") It does not throw an exception, but is not able to launch a browser.
7
9605
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script language="JavaScript"> var cntlName; var eleTarget = document.getElementById('hiding'); function showOrHide(){
12
1767
by: amit | last post by:
Hello group, I'm kinda skeptical about a code is being used in my js program. All it does is checking what browser is being run and finds out if FLASH is installed or not. This code works just fine withe IE but as far as Firefox I'm not sure. Using the firefox I can see flash pages easily but when this code says firefox is not installed in my firefox!!!
6
5828
by: scotty | last post by:
I have a script that loops through an existing table list and prepares each href element node to trigger a function when an image is clicked. The function that will be run passes a property value to the function upon clicking. The property value is one of the attributes defined for each respective href in the property list. In IE and Netscape, the property values pass correctly, but in Firefox, only the last property value in the list...
7
2535
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
3
2426
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a couple of the Firefox is munging up. So, on my information page there is a gridview in the content section of the page. The masterpage contains searching capabilities for the gridview. The masterpage has controls contained in a panel control,...
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.