473,416 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Image display on mouseOver, but not in IE

I am coding a site which involves uploading images. All of the PHP
and display is OK but the client wants to be able to display the image
thumbnail on the upload page and show the full image on mouseOver
instead of the popup I coded. The section of code below works
perfectly in Firefox but not at all in IE (why am I not surprised?).
The page is nearly 100% dynamic, so this is extracted from the source
of a test page. The code in question is in the last two spans.
Please excuse line wrapping:

<div id="i1" style="clear:both;">
<div style="margin:10px 0 10px 15px; font-size: 1.2em;
text-align:left; font-weight:bold;">Image #1</div>
<div id="row">
<span id="lbl">Image Caption:</span>
<span id="fld"><input type="Text" id="i_caption1"
name="i_caption1" value=""></span>
</div>
<div id="row">
<span id="lbl">Select Image to Upload:</span>
<span id="fld"><input id="image1" type="file" name="image1"
value=""></span>
</div>
<div id="row" style="position:relative;">
<span id="lbl"><label for="dele1">Delete This
Image?</label><br><input type="Checkbox" id="dele1" name="dele1"
value="1" style="border:0;"><label for="dele1">Yes</label></span>
<span id="fld"><a href="#" onClick="openView ('10031.5.1.jpg',
200, 266)"><img
onMouseover="document.getElementById('show1').styl e.display='inline';"
onMouseout="document.getElementById('show1').style .display='none';"
src="uImages/10031.5.1.t.jpg?f10eb11e77ac7d52e980c80b010f18c6"
border="0"></a></span>
<span id="show1" style="z-index:1; width:200; height:266;
display:none; position:absolute; left:280px;"><img
src="uImages/10031.5.1.jpg?f10eb11e77ac7d52e980c80b010f18c6"
width="200" height="266" border="0"></span>
</div>
</div>

Any ideas?

As a side note, the randomly generated query string following the
image name is a hack I found which prevents the image from being
reloaded from cache in IE. It seems that no header prevents IE from
caching images (which, after a couple hours of going nuts, I figured
out... duh!). Anyway, any hack that works is a good hack. ;-)

TIA!
Jul 21 '05 #1
2 6755
Tyrone Slothrop wrote:
I am coding a site which involves uploading images. All of the PHP
and display is OK but the client wants to be able to display the image
thumbnail on the upload page and show the full image on mouseOver
instead of the popup I coded. The section of code below works
perfectly in Firefox but not at all in IE (why am I not surprised?).
The page is nearly 100% dynamic, so this is extracted from the source
of a test page. The code in question is in the last two spans.
Please excuse line wrapping:
<snip>
As a side note, the randomly generated query string following the
image name is a hack I found which prevents the image from being
reloaded from cache in IE. It seems that no header prevents IE from
caching images (which, after a couple hours of going nuts, I figured
out... duh!). Anyway, any hack that works is a good hack. ;-)
TIA!


When I hard code the image src (in both places) to one that exists on my
hdd, your code works in my IE6. Did you try that yourself? e.g.
<img ... src="/Temp/stampdad/images/pwo-logo.gif" border="0"></a>
<img src="/Temp/stampdad/images/pwo-logo.gif" width="200" height="266"
border="0">

I'm wondering if IE has a problem with the random string?
uImages/10031.5.1.t.jpg?f10eb11e77ac7d52e980c80b010f18c6

Mike
Jul 21 '05 #2
On Fri, 17 Jun 2005 19:27:39 -0700, mscir <ms***@yahoo.com> wrote:
Tyrone Slothrop wrote:
I am coding a site which involves uploading images. All of the PHP
and display is OK but the client wants to be able to display the image
thumbnail on the upload page and show the full image on mouseOver
instead of the popup I coded. The section of code below works
perfectly in Firefox but not at all in IE (why am I not surprised?).
The page is nearly 100% dynamic, so this is extracted from the source
of a test page. The code in question is in the last two spans.
Please excuse line wrapping:
<snip>
As a side note, the randomly generated query string following the
image name is a hack I found which prevents the image from being
reloaded from cache in IE. It seems that no header prevents IE from
caching images (which, after a couple hours of going nuts, I figured
out... duh!). Anyway, any hack that works is a good hack. ;-)
TIA!


When I hard code the image src (in both places) to one that exists on my
hdd, your code works in my IE6. Did you try that yourself? e.g.
<img ... src="/Temp/stampdad/images/pwo-logo.gif" border="0"></a>
<img src="/Temp/stampdad/images/pwo-logo.gif" width="200" height="266"
border="0">

I'm wondering if IE has a problem with the random string?
uImages/10031.5.1.t.jpg?f10eb11e77ac7d52e980c80b010f18c6

Mike


After playing around a bit, I realize it has something to do with the
div position:relative and the span position:absolute. The query
string removal does not affect the image display in my tests.

Here (again) is the section in question:

<div id="row" style="position:relative;">
<span id="lbl"><label for="dele1">Delete This
Image?</label><br><input type="Checkbox" id="dele1" name="dele1"
value="1" style="border:0;"><label for="dele1">Yes</label></span>
<span id="fld"><a href="#" onClick="openView ('10031.5.1.jpg',
200, 266)"><img
onMouseover="document.getElementById('show1').styl e.display='inline';"
onMouseout="document.getElementById('show1').style .display='none';"
src="uImages/10031.5.1.t.jpg?f10eb11e77ac7d52e980c80b010f18c6"
border="0"></a></span>
<span id="show1" style="z-index:1; width:200; height:266;
display:none; position:absolute; left:280px;"><img
src="uImages/10031.5.1.jpg?f10eb11e77ac7d52e980c80b010f18c6"
width="200" height="266" border="0"></span>
</div>
</div>

If I remove the position:relative from the div, the image displays in
IE, but all the way over on the left side of the browser window.

I am at a loss to the solution -- I just haven't had the experience to
troubleshoot this situation. Any geniuses out there see the folly of
my efforts here?
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jim Buzbee | last post by:
I have a subroutine that inserts image objects into a page for me. It works fine except for one thing. My mouseover settings don't appear to take. i.e. I see nothing at all when I move the mouse...
3
by: DOK | last post by:
I'm creating an ad for eBay and want to keep the page condensed. I have 6 images - different views of an antique lap steel guitar - that need to show superb detail. I have cropped the images to...
4
by: murrayatuptowngallery | last post by:
I have looked at some mouseover/ sound object scripts and can't get them to work. Most were more complex than needed and introduced several new parameters for me. I found a simple pair of html...
3
by: Raed Sawalha | last post by:
Dear : I have an image in a aspx page I need when user mouseover it to display HTML Table with links. Regards
4
by: alex.kemsley | last post by:
Dear all, I am a very novice javascriper and have cobled this together from various places. I didnt expect it to work but hopefully will give you an idea of what i want to achive. I need 5 links...
3
by: Annette Acquaire | last post by:
I have and image map with a dozen hotspot links on it that I'm trying to get to open a new image over existing one on mouseover of each COORD. The only thing I was able to do was swap image on...
1
by: mrquestions | last post by:
Hey, new to the forum, have looked everywhere for some information of the following query but can't find it anywhere... Within a site I am building a division calls on an include function to...
8
by: John | last post by:
Hi Pasrt of HTML - <div class='button'><input type='image' src='/images/check1.jpg'></input></div> Part of CSS - ..button {background-image: url(/images/check1.jpg); background-repeat:
0
by: spacecadet563 | last post by:
I am trying to change and display the image source of an image control (named image2 )on mouseover of cell event on a gridview(Gridview1) with a SQL datasource. The cell contains image name of image...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
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...
0
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
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 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.