473,491 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Firefox and CSS popup problem

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.  
Jun 22 '07 #1
5 2227
acoder
16,027 Recognized Expert Moderator MVP
Maybe you could call the Firefox/Opera/Safari, etc. code after the file has fully loaded:
Expand|Select|Wrap|Line Numbers
  1. xmlDoc2.onload= function() {...
Jun 23 '07 #2
pbmods
5,821 Recognized Expert Expert
Heya, jpk.

Are you getting an error message, or is the code just not executing?

Try adding an alert() statement in your show() function and moving it around until the alert stops showing up. Then you know where your problem is.
Jun 23 '07 #3
jpk872
15 New Member
Hi,

If you look at line 29, "alert(x)" works, but innerHTML doesn't. I was thinking maybe for some reason the popup window is covered or off the screen.
Jun 24 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
Where's the code for the CSS popup? How are you positioning it?
Jun 25 '07 #5
jpk872
15 New Member
here is the html for the popup

Expand|Select|Wrap|Line Numbers
  1.  
  2.       <div id="popup" style="left:800px; top:50px; width:150px; height:70px;"></div>
  3.         <div id="restext"></div>
  4.  
  5.         <br />
  6.         <div id="serverResponse" style="margin-left:100;margin-top:150;color:#FFFFFF;font-family:arial"></div>
  7.  
  8.  
Jun 26 '07 #6

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

Similar topics

1
2323
by: dejausenet | last post by:
I have firefox 1.0, running on winxp Firefox blocks popups fine, but sometimes, for selected occassions only, i would like to be able to have window popup; without enabling whole domains, as...
1
2816
by: Bill H | last post by:
I run a dbms application that interfaces with the web. This module creates a frames page with two frames ('main' and 'mwinfoframe'). All communication with the dbms is routed through the...
3
2250
by: Alex | last post by:
Hi, I'm having some trouble implementing a popup in firefox. I attached some simplified code at the bottom. This is part of a firefox extension. What happens is that a popup window is created,...
23
6365
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
3
2100
by: Jim Davis | last post by:
The scenario: 1) Generate a popup window via script. 2) Populate it (again via script) with content that features local (hash) links. In IE 6.x this works - the links work as they should,...
11
7319
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
3
6808
by: atn2002 | last post by:
I'm trying to create a control which when the mouse button gets pressed on one div an absolute positioned div pops up in place of the cursor. From there the cursor should interact with the dialog...
0
7115
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,...
0
6978
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...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6858
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...
0
7360
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...
1
4881
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...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.