Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 15th, 2003, 01:17 PM
BiC BiC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: netherlands
Posts: 3 BiC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to BiC Send a message via Yahoo to BiC
Exclamation 'populate' is undefined

URL

I get this error, but i've traced endlessly and can't find a solution.. Can anyone please help me out?

Here's the script of the slideshow.php:

-----------------------------------------------------------------------------
<?php
$templates_used = 'slideshow';
$main_template = 'slideshow';

define('GET_CACHES', 1);
define('ROOT_PATH', './');
define('MEDIA_DIR', '../data/media');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');

if (!$cat_id || !isset($cat_cache[$cat_id]) || !check_permission("auth_viewcat", $cat_id)) {
header("Location: ".$site_sess->url(ROOT_PATH."index.php", "&"));
exit;
}

if ($action == "slideshow") {

$txt_clickstream = "";
if ($cat_id && isset($cat_cache[$cat_id])) {
$txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
}

$slideshow_id = $cat_id;
$slideshow_id = MEDIA_DIR."/".$slideshow_id."/";
$main_template = 'slideshow';
$file_array = "";
$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);

$countit = 0;
$file_array = "theimage[0]=[' ','";
$mydir = opendir($slideshow_id) ;
$exclude = array("mp3","php","gif") ;
while($fn = readdir($mydir))
{
if (stristr($fn,$exclude[0]) ||stristr($fn,$exclude[1]) ||stristr($fn,$exclude[2]) || strlen($fn)< 3 ) continue;
$countit = $countit + 1;
$file_array = $file_array."".$slideshow_id."".$fn. "',' ']; theimage[".$countit."]=[' ','";
}

closedir($mydir);

$file_array = substr("$file_array", 0, -19);
if ($countit == 0) {
$msg = "There are no images available for the slideshow. Please try another category";
}

//echo "$file_array";

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"file_array" => $file_array,
"slideshow_id" => $slideshow_id,
"random_cat_image" => $random_cat_image,
"msg" => $msg,
"countit" => $countit,
"clickstream" => $clickstream,
"lang_control_panel" => $lang['control_panel']
));

unset($random_cat_image);
unset($file_array);
unset ($countit);

$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>
-----------------------------------------------------------------------------

Reply With Quote
  #2  
Old March 18th, 2003, 09:20 AM
ishnid's Avatar
ishnid ishnid is offline
kill 9, $$;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Sep 2001
Location: Dublin, Eire
Posts: 5,568 ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level)ishnid User rank is General 6th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 4 Days 1 h 39 m 10 sec
Reputation Power: 1395
Looks like you've been shunted around the forums on this one. The problem is in your JavaScript. View the source of the page your PHP generates and post that to the JavaScript forum - you might get more replies then.
Good luck

~ishnid

BTW this has nothing at all to do with Java (Java and JavaScript are very different)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > 'populate' is undefined


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway