PHP Classes

javascript error

Recommend this page to a friend!

      Mini Gallery  >  All threads  >  javascript error  >  (Un) Subscribe thread alerts  
Subject:javascript error
Summary:javascript error because of aimg_h array not set
Messages:3
Author:steven
Date:2006-09-05 14:01:13
Update:2006-09-06 09:09:36
 

  1. javascript error   Reply   Report abuse  
Picture of steven steven - 2006-09-05 14:01:13
When calling minigal this way :
minigal.php?dir=../gallery/photos/meetings/2005_04_25

I get a javascript error (both on IE and Mozilla) because of the aimg_h array wich is set to nothing. None thumbnail is diplayed.

Here is the source code of the page I get :

<script language="Javascript">

createtipbox();
aimg[0]="../gallery/photos/meetings/2005_04_25/PICT0005.JPG";
sel_picidx = 0;
aimg[1]="../gallery/photos/meetings/2005_04_25/PICT0006.JPG";
aimg[2]="../gallery/photos/meetings/2005_04_25/PICT0007.JPG";
aimg[3]="../gallery/photos/meetings/2005_04_25/PICT0008.JPG";
aimg[4]="../gallery/photos/meetings/2005_04_25/PICT0012.JPG";
aimg[5]="../gallery/photos/meetings/2005_04_25/PICT0013.JPG";
aimg_h[0] = ;
aimg_h[1] = ;
aimg_h[2] = ;
aimg_h[3] = ;
aimg_h[4] = ;
aimg_h[5] = ;
img_widths[0] = 2272;
img_widths[1] = 2272;
img_widths[2] = 2272;
img_widths[3] = 2272;
img_widths[4] = 2272;
img_widths[5] = 2272;
img_heights[0] = 1704;
img_heights[1] = 1704;
img_heights[2] = 1704;
img_heights[3] = 1704;
img_heights[4] = 1704;
img_heights[5] = 1704;
</script>

  2. Re: javascript error   Reply   Report abuse  
Picture of Matt Matt - 2006-09-05 21:09:52 - In reply to message 1 from steven
Your many lines that look like this:

aimg_h[0] = ;

are invalid. This is the english of equivilent of saying "Let the zero-th index aimg_h be" and stopping your sentence there. If the function expects a number, try

aimg_h[0] = 0;

or if you explicitly want it to be empty, use

aimg_h[0] = null;

  3. Re: javascript error   Reply   Report abuse  
Picture of steven steven - 2006-09-06 09:09:36 - In reply to message 2 from Matt
I had already tried this, of course, but it still did not work.
I don't know what this array is used for, but its values seem to be important.
The only way I solved this issue was to reduce the dimensions of my images (from something like 2000x1700 to 1024x768).
Anyway, I would like to be able to use images of any dimension...