function displaying as undefined?? helllp!!!
Posted: Thu Nov 06, 2008 8:55 am
I hope someone can help, Im having problems adding a javascript gallery to a php site...it doesnt work, and i cant figure out why not......???
this is my header section, where I have linked the css and javascript files (to the page contents php file)
<?php
if($_GET['p']=="bboys"){ ?>
<script type="text/javascript" href="<?=$PATH_TO_CSS?>jquery.js"></script>
<script type="text/javascript" href="<?=$PATH_TO_CSS?>jquery.galleria.pack.js"></script>
<link rel="stylesheet" type="text/css" href="<?=$PATH_TO_CSS?>gallery.css" />
<script type="text/javascript" href="<?=$PATH_TO_CSS?>">
jQuery(function($) {
$('.skratch_gallery').addClass('gallery_class'); // adds new class name to maintain degradability
$('.nav').css('display','none'); // hides the nav initially
$('ul.gallery_class').galleria({
history : false, // deactivates the history object for bookmarking, back-button etc.
clickNext : true, // helper for making the image clickable. Let's not have that in this example.
insert : undefined, // the containing selector for our main image.
// If not found or undefined (like here), galleria will create a container
// before the ul with the class .galleria_container (see CSS)
onImage : function() { $('.nav').css('display','block'); } // shows the nav when the image is showing
});
});
</script>
<?php
this is my page content function......php
function get_content_bboys()
{
//$query = ("SELECT *FROM bboys WHERE id = bboys);
//echo $query;
//$result = mysql_query($query);
$result = mysql_query("SELECT *FROM bboys WHERE id = bboys");
$content = "<div class='demo'>\n";
$content .= "<ul class='skratch_gallery'>\n";
$content .= "<li'>\n";
while ($row = mysql_fetch_array($result));
{
$content .= "<a href='index.php?p=bboys" . $row['id'] . "' title='" . $row['name'] . "'>
<img src='/skratch/bboys/" . $row['img_file'] . "' alt='" . $row['name'] . "' />
</a>\n";
}
$content .= "</li'>\n";
$content .= "</ul>\n";
$content .= "</div>\n";
return $content;
}
this is my url...
http://www.teragraphix.com/skratch/index.php?p=bboys
this is my header section, where I have linked the css and javascript files (to the page contents php file)
<?php
if($_GET['p']=="bboys"){ ?>
<script type="text/javascript" href="<?=$PATH_TO_CSS?>jquery.js"></script>
<script type="text/javascript" href="<?=$PATH_TO_CSS?>jquery.galleria.pack.js"></script>
<link rel="stylesheet" type="text/css" href="<?=$PATH_TO_CSS?>gallery.css" />
<script type="text/javascript" href="<?=$PATH_TO_CSS?>">
jQuery(function($) {
$('.skratch_gallery').addClass('gallery_class'); // adds new class name to maintain degradability
$('.nav').css('display','none'); // hides the nav initially
$('ul.gallery_class').galleria({
history : false, // deactivates the history object for bookmarking, back-button etc.
clickNext : true, // helper for making the image clickable. Let's not have that in this example.
insert : undefined, // the containing selector for our main image.
// If not found or undefined (like here), galleria will create a container
// before the ul with the class .galleria_container (see CSS)
onImage : function() { $('.nav').css('display','block'); } // shows the nav when the image is showing
});
});
</script>
<?php
this is my page content function......php
function get_content_bboys()
{
//$query = ("SELECT *FROM bboys WHERE id = bboys);
//echo $query;
//$result = mysql_query($query);
$result = mysql_query("SELECT *FROM bboys WHERE id = bboys");
$content = "<div class='demo'>\n";
$content .= "<ul class='skratch_gallery'>\n";
$content .= "<li'>\n";
while ($row = mysql_fetch_array($result));
{
$content .= "<a href='index.php?p=bboys" . $row['id'] . "' title='" . $row['name'] . "'>
<img src='/skratch/bboys/" . $row['img_file'] . "' alt='" . $row['name'] . "' />
</a>\n";
}
$content .= "</li'>\n";
$content .= "</ul>\n";
$content .= "</div>\n";
return $content;
}
this is my url...
http://www.teragraphix.com/skratch/index.php?p=bboys