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) -
-
<img name=showHobbies src="" style="position:absolute;left:550;top:25;width:100;height:50" onmouseover="show(fullfile)" onmouseout="hide()">
-
-
function show(dataSource)
-
{
-
-
-
-
if (window.ActiveXObject) {
-
-
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
-
xmlDoc.async = false;
-
xmlDoc.load(dataSource);
-
-
-
var stringHobby = xmlDoc.documentElement.lastChild.firstChild.nodeValue;
-
var name = xmlDoc.getElementsByTagName("first")[0].firstChild.nodeValue;
-
document.getElementById("popup").innerHTML = name + "'s hobbies:\n" + stringHobby;
-
-
}
-
-
else {
-
-
xmlDoc2= document.implementation.createDocument("","",null);
-
xmlDoc2.load(dataSource);
-
-
// alert(xmlDoc2);
-
var x = xmlDoc2.getElementsByTagName("hobbies")[0].firstChild.nodeValue;
-
var name = xmlDoc2.getElementsByTagName("first")[0].firstChild.nodeValue;
-
//alert(x);
-
document.getElementById("popup").innerHTML=x;
-
//document.getElementById("popup").innerHTML="blah blah blah";
-
-
-
//myXMLHTTPRequest = new XMLHttpRequest();
-
//myXMLHTTPRequest.open("GET", dataSource, false);
-
//myXMLHTTPRequest.send(null);
-
//var xmlDoc = myXMLHTTPRequest.responseXML;
-
-
-
-
//var stringHobby = xmlDoc.documentElement.lastChild.firstChild.nodeValue;
-
// var name = xmlDoc.getElementsByTagName("first")[0].firstChild.nodeValue;
-
//document.getElementById("popup").innerHTML = name + "'s hobbies:\n" + stringHobby;
-
}
-
-
-
-
-
var popwin = document.getElementById("popup");
-
popwin.style.visibility="visible";
-
-
-
}
-
-
-
function hide()
-
{
-
var popwin = document.getElementById("popup");
-
popwin.style.visibility="hidden";
-
}
-
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: - xmlDoc2.onload= function() {...
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.
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.
acoder 16,027
Recognized Expert Moderator MVP
Where's the code for the CSS popup? How are you positioning it?
here is the html for the popup -
-
<div id="popup" style="left:800px; top:50px; width:150px; height:70px;"></div>
-
<div id="restext"></div>
-
-
<br />
-
<div id="serverResponse" style="margin-left:100;margin-top:150;color:#FFFFFF;font-family:arial"></div>
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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,...
|
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...
|
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,...
| |
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...
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |