View Full Version : Simple Controls Gallery v1.3 Not(Partly) Displaying in IE

12-09-2010, 09:06 PM
1) Script Title: Simple Controls Gallery v1.3

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem:
I configured several galleries and uploaded on server
(http:// seaphotos.lawandsea.net/1_seaphotos_index.html (http://seaphotos.lawandsea.net/1_seaphotos_index.html)), all works OK in FF 3.6.12, but in IE 8 only first page displays gallery, all other pages display just white field. Because I have many galleries I made one small modification to coding offered by DD: I collected all styles below:

#simplegallery1{ //CSS for Simple Gallery Example 1
position: relative; /*keep this intact*/
visibility: hidden; /*keep this intact*/
border: 10px solid darkred;

#simplegallery1 .gallerydesctext{ //CSS for description DIV of Example 1 (if defined)
text-align: left;
padding: 2px 5px;

in one css file and for every new gallery I made its own CSS rule in this css file, i.e. #simplegallery1, #Seascapes_Main, #Seasunsets_Main, etc. - do not think it affect gallery performance in any way. In IE 8 only one array, on home page (http:// seaphotos.lawandsea.net/1_seaphotos_index.html (http://seaphotos.lawandsea.net/1_seaphotos_index.html)) is displaying gallery. Array in question (below) stops working in IE 8 even if one line added or removed:(:

imagearray: [
["images/MainMenu/seascapes_menu.jpg", "5_seaphotos_Seascapes.html", "", ""],
["images/MainMenu/seasunsets_menu.jpg", "6_seaphotos_Sunsets.html", "", ""],
["images/MainMenu/ships_menu.jpg", "7_seaphotos_Ships.html", "", ""],
["images/MainMenu/harbours_menu.jpg", "8_seaphotos_Harbours.html", "", ""]

Please assist.:confused:
Please also clarify whether only
var mygallery=new simpleGallery mygallery must be unique, i.e. mygallery1, mygallery2, mygallery3, etc but wrapperid: "simplegallery1", - ID of main gallery container can be the same (e.g. simplegallery1) for all galleries. :confused:
Many, many thanks in advance.

12-10-2010, 04:22 AM
If the css of all .gallerydesctext are the same, get rid of all of the many individual rules like:

#SChina_evening .gallerydesctext {
. . .


#Harbours_Main .gallerydesctext{
. . .

And have just one rule:

.gallerydesctext {
. . .


var whatever=new simpleGallery({
. . .

isn't really needed, it can be just:

new simpleGallery({
. . .

You only need a unique wrapperid for each gallery here:

new simpleGallery({
wrapperid: "Seascapes_Main", //ID of main gallery container,
dimensions: [614 . . .

if you have more than one gallery on the page, or if you have persistence set to true and you don't want persistence carrying over from one page to another.

At present neither of these appears to be the case, so they all could be just:

new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [614 . . .

Of course that also means that the id of the target division on each page will have to become simplegallery1. But it also means, as long as they all have the same style, you need only one set of css style rules for all of them as well.

As for adding or subtracting from the imagearray, you cannot have a situation like so (from the Sea Photos | Seascape Galleries page):

imagearray: [
["images/Seascapes/1seascapes_menu1.jpg", "1Seascapes/1_SChina_evening.html", "", ""],
["images/Seascapes/1seascapes_menu2.jpg", "1Seascapes/2_Ships_Wake.html", "", ""],
["images/Seascapes/1seascapes_menu3.jpg", "1Seascapes/3_Volcano_Io_Take.html", "", ""],
["images/Seascapes/1seascapes_menu4.jpg", "1Seascapes/4_Evening_Rainbow.html", "", ""],
["images/Seascapes/1seascapes_menu5.jpg", "1Seascapes/5_OPL.html", "", ""],

No comma (red) allowed after the last entry in the array. This is only a problem for IE. There are other ways to mess things up in that section that will only affect IE. Missing images or extra commas inside at the end of individual entries are two I can think of. Other syntax errors in that section could affect all browsers.

04-27-2012, 05:03 PM
for me, It was the , at the end of the image array.
I must have mistakenly added, also had no idea IE had issues with that.

Thank you for pointing that out.