View Full Version : album variable undefined error message

10-04-2009, 06:32 AM
1) Script Title: PHP Photo Album script v2.11

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

3) Describe problem:

page will not load error message displayed Error: 'myvacation' is undefined

<script type="text/javascript">
new phpimagealbum({
albumvar: myvacation, //ID of photo album to display (based on getpics.php?id=xxx)
dimensions: [3,2],
sortby: ["date", "file"], //["file" or "date", "asc" or "desc"]
autodesc: "Photo %i", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
showsourceorder: true, //Show source order of each picture? (helpful during set up stage)
onphotoclick:function(thumbref, thumbindex, thumbfilename){
thumbnailviewer.loadimage(thumbref.src, "fit2screen")


10-04-2009, 07:04 AM
That variable is defined by the getpics.php file's query id value. If you do not have PHP and/or have not properly setup the getpics.php file, it will not be defined.

PHP is a server side language, so generally you would have to upload your page and its resource files to a PHP enabled server in order to have this work. However, it is possible to setup a local server for testing purposes. I have never bothered to do this though.