|
|
|||||||||||
|
|
||||||||||||
JustSo
Picture Window 1 (not 3) Basics Example Issues
|
||||||||||||
| Basics: |
The behavior opens a popup window which can be either full-screen (no matter the screen resolution) or instead "hug" the borders of an image, with or without a border of your choice of bgcolor. The image itself is displayed full-size or sized downwards if needed to fit on lower resolution monitors. So one always gets to see the full image no matter the monitor resolution, with aspect ratio maintained. Clicking anywhere closes the popup.
Tips:
A) Not getting (onClick) as the default Event? At least on the PC, in the Behaviors window you must select "Version 4 and later browsers" for "Show Events For". IE4+ just does not cut the mustard. See helpful image. With this proper setting, (onClick) - which means the onClick event will be added to the <A> tag (rather than to the <img> tag for example) - will be automatically used when the Behavior is added to the page. [ If you must use a different ShowEventsFor value, then before applying the Behavior simply select the <A> tag that wraps the <IMG> (for example). Do this easily on the Tag Selector Bar. ]
B)Choice of events: Iif you use NON-'href=' events do NOT put anything into the link field as old Netscape browsers do not support this. I.e. if you use an event in parentheses , like (onClick) or (onMouseUp), in the Behavior Window, then you must have the "#" or "javascript:;" in the Link field, but if you use the _other_ events, the ones without parentheses, then NN refuses to work if you have anything in the Link field. Exception: if you are adding the behavior to a HotSpot, then "javascript:;" is REQUIRED in the Link field, even in Netscape.
C) Page jumping to top of screen: It is best to do a global find/replace to change the '#' links to 'javascript:;' to avoid page jumping to top of screen when user clicks on the link. Or get Al Sparber's command for this ("Fix Null Links") from the DW Exchange.
D) The vwd_justso.htm file: You will get some very odd results if you fail to upload the file vwd_justso.htm (which the behavior has placed in the same folder as your doc) to your server.
Examples of the sorts of error you might get:
E) Want users to be able to save the image (by turning off the click-anywhere-to-close feature)? BUT be aware that now many many popup windows may be spawned by the user.
Remove
the text in red from the script:
newWindow.document.write('<html><title>'+alt+'</title><body
leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+'
onBlur="self.close()" onClick="self.close()">');
You should
also change "Click window to close" to something else.
F) Some
Mac browsers have a bug resulting in space being left for a scrollbars altho
none are requested. Get around this by editing the code in the Head:
newWindow
= window.open("vwd_justso.htm","newWindow",-> [all
on one line, with no spaces]
"
width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop
);
to
newWindow = window.open("vwd_justso.htm","newWindow",-> [all
on one line, with no spaces]
"
width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop+",scrollbars=no" );
History:
-
Ver 3.0.4 Fixed an embarrassing bug that erroneously told PC users who
do not also have Fireworks installed that they must add the image dimensions
manually. Mea culpa, but all fixed now.
- Ver 3.0.2 In DW4, you can now save your settings as defaults! Even more
important, however, is that the Mac version now a) allows for auto-detection
of image dimensions, albeit utilizing a slow method which employs
and requires Fireworks version 3 or higher and b) now uses the DW4 colorpicker
(this requires DW4 or higher) to choose the popup window's bgcolor. Better
error handling added as well.
- Ver 2.2.3 Now properly reflected in site cache and site map.
- Ver 2.1.9 Now allows any legal character in path and imagename. Can
now work on root-relative sites as well as document-relative. Better handling
of spaces in imagenames.
- Ver 2.1.7 Fixed several issues with unusual file and image paths.
- Ver 2.0.0 added auto-detection of image size! and AOL compatibility!
(windows ver)
- Ver 1.2.2 added a color palette dropdown to ease selection of the bgcolor.(windows
ver)
- Ver 1.2.1 now have the option of adding a border of bgcolor to a hugged
image; now fails gracefully with most AOL browsers and Opera (by putting
the image in a conventional browser window.)
| Example: |
JustSo
Picture Window Examples page.
| Known issues : |
1) Safari was released with the same bug that Netscape6.0 had - the image does not appear in the popup window. See note at top of screen.Jspw1 is defunct. The completely new version (JSPW3) WILL display in Safari, as well as adding many, many new features and options and is now available here.
2) Netscape 6.1 and lower, but NOT 6.2.1 Mozilla v 0.9.4, at least for the PC, had a bug (http://bugzilla.mozilla.org/show_bug.cgi?id=53350) that is apparently now fixed. (Unfortunately the bug is still present in the Mac version.) NOTE: If you are checking the behavior LOCALLY, even N6.2.1 and N7.0 (+?) will fail, try viewing the same page ON YOUR SERVER and it WILL work! Weird but true.
3) A single user has, after extensive testing on two machines, found that on the Mac, Netscape 4.7 (others?) cannot handle multiple image hotspots with this behavior attached. (Blue and White Powermacintosh G3 - 400 MHz with 256 MB RAM, running Mac OS 9.1 and Netscape 4.7) The workaround is to use image slices rather than hotspots. Another user today (5/18/01) who we thought was having the same problem eventually discovered that his was a different issue - see (2) below. So is this a real issue? Please write me if you have this problem as well.
4) Two users have now reported that on the Mac, using N4.7 (others?), on the SECOND of DUAL monitors, will not support this behavior properly.(One user's configuration: Powermac G4-500MP, Dual 17" Apple Studio Display,ATI cards for both, Mac OS 9.1,Tons -o- RAM,50MB RAM partition for NS.) Runs fine on the first monitor, just not the second.
5) Several people have written to say they have found problems with clicking to close the popup, but only on some Macs (G4 Mac-OS 9, Blue G3, and G3 PowerBook-OS 8.6, using NN 4.75 or NN4.5). I have no clue as to how to solve those issues, but do consider it relatively minor (?) as the user can still close by clicking on the browser's closewindow icon. If anyone knows how to solve this problem, please let me know, I'd sure appreciate it.
6) Two people have now told me that on G3 Macs, OS9.1, running IE5, that the border around the image is uneven. Both have hit on using 20pixel wide borders to make things more-or-less symmetrical looking. I now have a remedy for this which will appear in the next version.
7) MacIE 5.0 and some Netscape browsers have a problem with onMouseDown, so best to avoid use of that event.
8) Hopefully
outdated info (see (2) above):
It has been found by three individuals, that Netcape 6.0x (only)
on Windows2000
crashes (sporadically) if the user clicks away from the popup
window to close it. (Possible good news - one user just informed me
on 7/5/01
that his upgrade to N6.1 does not seem to have this problem. The
following code solves the problem, but is no longer needed with the
appearance
of 6.2.1 Mozilla 0.9.4:
(OLD INFO) Replace the line that says
newWindow.focus() ;
with
if ((document.all || document.layers ) || (document.getElementById && navigator.userAgent.indexOf('NT') == -1)) newWindow.focus();
| Unanswered questions? |
Jspw1 is defunct. The completely new version (JSPW3) WILL display in Safari, as well as adding many, many new features and options and is now available here.
If you have other problems or suggestions I would like to hear from you,
so please email
me.
|
I am ready to help you by writing javascripts, or that specialized Dreamweaver extension you've always wanted, on a contract basis. Just email me at michael@valleywebdesigns.com.
|
[ home
| services | examples
| contact me ] |
|
for JustSo Picture Window |