PDA

View Full Version : Image w/description tooltip problem



inkgoddess
02-05-2007, 08:10 PM
1) Script Title:
Image w/ description tooltip
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm
3) Describe problem:
Help!! I'm not having this problem on any other page I'm using the script except here: http://www.TheAllisonScottsdale.com/gallery.html
The tooltip is functioning fine on the left and right sides, but the 4th and 5th column in from the left, the image tooltip cuts off the page. Is there a way to "center" the tooltip on the page?
Please advise. I appreciate your time.
Thank you in advance,
InkGoddess

ddadmin
02-05-2007, 10:41 PM
Firstly, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice:


/*
Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
Copyright 2002 by Sharon Paine
Visit http://www.dynamicdrive.com for this script
*/

Regarding your question, looks like this script fell through the cracks in terms of an IE positioning bug. Firstly, in the HEAD section of your page, find the line:


var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : standardbody

The line in red is new. Add it directly below the line above it.

Then, just do a search and replace, searching for "document.body" and changing that to "standard".

That should do it.

jscheuer1
02-05-2007, 10:52 PM
Firstly, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice:


/*
Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
Copyright 2002 by Sharon Paine
Visit http://www.dynamicdrive.com for this script
*/

Regarding your question, looks like this script fell through the cracks in terms of an IE positioning bug. Firstly, in the HEAD section of your page, find the line:


var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : standardbody

The line in red is new. Add it directly below the line above it.

Then, just do a search and replace, searching for "document.body" and changing that to "standard".

That should do it.

Shouldn't that be:


var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body

The line in red (now blue with correction in red) is new. Add it directly below the line above it.

Then, just do a search and replace, searching for "document.body" and changing that to "standardbody".

Also, make sure you don't change the document.body in:


var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body

to standardbody.

inkgoddess
02-05-2007, 11:05 PM
Thanks for your help. I've fixed the credit code, and made the changes suggested... it's still cutting off. ?? Am I miscoding?
I really appreciate the time and assistance in this!
InkGoddess

ddadmin
02-06-2007, 02:34 AM
Are you sure? I just tested your page in IE7, and it seems to work correctly now.

inkgoddess
02-07-2007, 10:52 PM
Bummer, I'm still seeing the 4th & 5th row cut off.
If you saw it when it was "broken" then saw it fixed, I'll assume that I'm stuck in my ISP cache again. Ugh.
I so very much appreciate the help from ya'll.
Thank you!!!!
InkGoddess

jscheuer1
02-08-2007, 05:05 AM
I see. At 1024X768 resolution, there isn't enough space to display the larger images to the right of the cursor so, the script switches them to the left but, there isn't enough room there either. This is particularly evident on the third column from the left where, on portions of it the image will display on the left side of the cursor, on others it displays on the right side of the cursor.

The larger images are simply too large to fit beside the cursor on either side of it when the cursor is that close to the center of the screen.

Things get much worse at 800x600 resolution. DD was probably looking at it in 1440x900 or larger. That's my native resolution here and it looks just fine, full screen at that width.

If it were me, I would rethink my presentation. I'd suggest going with Lightbox (http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm) or Image Thumbnail Viewer (http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm), something that centers each larger image and pops them up onclick, instead of onmouseover. That or, use much smaller 'larger images'.

ddadmin
02-08-2007, 11:15 AM
John was right about my typo, sorry about that. There's actually another issue with the code I posted-basically, the variable "standardbody" will always contain null in IE, as it appears in the HEAD of the page before the body is available yet.

I've fixed that issue, plus the script now works in Opera 8/9 (just a browser detection issue): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

jscheuer1
02-08-2007, 11:29 AM
John was right about my typo, sorry about that. There's actually another issue with the code I posted-basically, the variable "standardbody" will always contain null in IE, as it appears in the HEAD of the page before the body is available yet.

I've fixed that issue, plus the script now works in Opera 8/9 (just a browser detection issue): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

That's great but, it still doesn't address the problem inkgoddes is having, does it? See my previous post in this thread.

ddadmin
02-08-2007, 11:46 AM
Nope but at least now the enlarged image will properly orient itself relative to the viewpoint of the user's window and not disappear on you in some cases. What's described is another issue with the script, and looking at the code, I'm tempted to just rewrite it once I have time to bring it out of the days of NS4.

jscheuer1
02-08-2007, 02:05 PM
Nope but at least now the enlarged image will properly orient itself relative to the viewpoint of the user's window and not disappear on you in some cases. What's described is another issue with the script, and looking at the code, I'm tempted to just rewrite it once I have time to bring it out of the days of NS4.

Well, it is an image tool tip script after all. It really wasn't intended as an image viewer like the way inkgodess is using it. The tool tip images were intended to be small images that illustrated accompanying text tips, text tips that are context sensitive to their triggers. That is where her problems began, I think.

inkgoddess
02-08-2007, 08:31 PM
Thanks! I've switched it to the Image Thumbnail Viewer. It's working great!
Thank you again, all, for all your help with this.
Your time is very much appreciated.
Have a great day!
InkGoddess

jscheuer1
02-09-2007, 04:27 AM
Looking good inkgoddess! Now if I could only get you to use actual thumbnail images and to optimize all of your images . . .

It would be a good idea, even on my broadband cable (just clocked at 1170.7 kbps) connection the page takes a little while to load. I'd hate to see it on dial up.

crystal
07-02-2007, 02:30 AM
Hi,

Thread: Image w/description tooltip
I am very new to dynamic script.

When I try to test this script IE restrict this page for showing pop up and I need to allow blocked content. But I try to open you page and it does not restrict. What should I change in this script.
But this does not happen in Firefox.

Thanks,
Crystal

jscheuer1
07-02-2007, 03:05 AM
Hi,

Thread: Image w/description tooltip
I am very new to dynamic script.

When I try to test this script IE restrict this page for showing pop up and I need to allow blocked content. But I try to open you page and it does not restrict. What should I change in this script.
But this does not happen in Firefox.

Thanks,
Crystal

Unless a user's security is really tight, that only happens locally, as a security measure. As far as IE is concerned, javascript is ActiveX. Click on the bar and click on allow and click on yes. Once your page is live, this will not happen. You can also give your page 'the mark of the web'. That way (in most cases) it will not display the security bar locally either. Put this right after your <html> tag like so:


<html>
<!-- saved from url=(0014)about:internet -->
<!-- this and above comment should be removed for live, non-demo use -->
<head>

But, navigating away from the page to another local page, or including another local page on it via a frame or an iframe can be problematical if said page does not also have 'the mark of the web' on it.

crystal
07-02-2007, 03:38 AM
It works fine. I really appreciate it. :)

regards,
Crystal